Giter VIP home page Giter VIP logo

Comments (6)

chr78rm avatar chr78rm commented on September 6, 2024

I have updated the test project to use the currently promoted version 4.6.2 within the build profile scala3-failure. Your latest commits have been integrated into the fork of your plugin. The branches scaladoc3 and classloader-issue are producing the version 4.6.3-EXPERIMENTAL now. Again, these version is referenced by the other build profiles of the reproducer.

from scala-maven-plugin.

slandelle avatar slandelle commented on September 6, 2024

@chr78rm Thanks for reporting.
Sadly, I can't review your fork:

  • lots of intermediate/trial-and-error/back-and-forth commits
  • not rebased on upstream's HEAD
  • is there an integration test proving your fix?

I'll only be able to review if you can provide a PR that fixes the above points (all the more as I personally use neither Scala 3 nor Scaladoc).
Regards

from scala-maven-plugin.

chr78rm avatar chr78rm commented on September 6, 2024

Thank you for your answer. I didn't want to put too much effort into this beforehand.

Please don't read too much into some of the commits on the branches. I needed to research your code and hence I had included some tracing statements at some time. After I understood the inner workings of the plugin well enough I had removed them again. Besides, I had updated the master branch of the forked repo to your latest commit (eac2c9b). After that, I integrated your latest commits including the fix for issue #600 into the scaladoc3 branch by working on the output of git diff master..scaladoc3 --name-only. That is to say the files listed by git diff master..scaladoc3 --name-only contain the relevant changes for the possible fix at this instant. All your commits up to (eac2c9b) are included in scaladoc3 now.

$ git diff master..scaladoc3 --name-only
pom.xml
src/main/java/scala_maven/ScalaDocMojo.java
src/main/java/scala_maven/ScalaMojoSupport.java
src/main/java/scala_maven_dependency/ArtifactIds.java
src/main/java/scala_maven_dependency/ArtifactIds4Scala2.java
src/main/java/scala_maven_dependency/ArtifactIds4Scala3.java
src/main/java/scala_maven_dependency/Context.java
src/main/java/scala_maven_dependency/Context4ScalaHome.java
src/main/java/scala_maven_dependency/Context4ScalaRemote.java
src/main/java/scala_maven_executions/ScalaDoc3Caller.java

I have attached a file with the full diffs to this comment but you might want to use an IDE for a better visual experience.

Additionally, I will replay the relevant diffs into a new branch rooted at your latest commit. I haven't looked into how you are organizing your integration tests yet. I'm using the mentioned test project as reference at this stage. E.g. the test project contains a build profile scala2 which can be used to verify that everything works in Scala2 as before. Another build profile works with Scala3.

Of course I can provide a pull request for this in due course.

diff-scaladoc3-master.txt

from scala-maven-plugin.

hohonuuli avatar hohonuuli commented on September 6, 2024

Is there a way to disable arguments that are used to execute the scaladoc? Under the hood the Scala-maven-plugin scaladoc execution is running a command like:

 /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java -Xbootclasspath/a:/Users/brian/.m2/repository/com/google/protobuf/protobuf-java/3.7.0/protobuf-java-3.7.0.jar:[...] -classpath /Users/brian/.m2/repository/net/alchim31/maven/scala-maven-plugin/4.8.0/scala-maven-plugin-4.8.0.jar scala_maven_executions.MainWithArgsInFile dotty.tools.dotc.Main /private/var/folders/d7/4ps3zfnx08n8gxq0wc9ydddw0000gq/T/scala-maven-2306955749493420450.args

The problem I seem to hit is that the temp file (e.g. /private/var/folders/d7/4ps3zfnx08n8gxq0wc9ydddw0000gq/T/scala-maven-2306955749493420450.args) contains the following lines:

-doc-format:html
-doc-title
"scommons 0.0.4_3 API"

These flags are are no longer appropriate for scaladoc 3 and when included produce the following:

bad option '-doc-format:html' was ignored
bad option '-doc-title' was ignored
source file not found: scommons 0.0.4_3 API
2 warnings found
1 error found

When I manually edit those out of the args file and rerun the command above, it works fine. So being able to strip those out of the args file might resolve this issue.

from scala-maven-plugin.

hohonuuli avatar hohonuuli commented on September 6, 2024

Code that produces the bad flag is here

from scala-maven-plugin.

mnd999 avatar mnd999 commented on September 6, 2024

The flags are old and deprecated but they shouldn't break anything according to lampepfl/dotty#11907. The problem seems to be the newline that gets generated between -doc-title and the module name itself. If the offending lines in the file become as follows, we get warnings but it doesn't fail anymore:

-doc-format:html
-doc-title "scommons 0.0.4_3 API"

This would seem like a reasonably quick workaround to do.

from scala-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.