Comments (6)
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.
@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.
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.
from scala-maven-plugin.
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.
Code that produces the bad flag is here
from scala-maven-plugin.
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)
- compile scala and java project , Exception java.lang.StackOverflowError HOT 5
- deprecation warnings HOT 5
- Mixed Java & Scala 3.x compilation broke with release 4.7.2 and newer HOT 5
- Zinc is invoked with two -release arguments HOT 2
- bad option '-release' HOT 8
- Problems with java 17 and mvn build. HOT 5
- maven.compiler.release support is not consistent with javac
- Yet another (maybe user-error) problem with 4.8.1 HOT 1
- Java 11 is compatible with 2.11.12 onwards. But the referenced check is blocking this version HOT 1
- Why have this as 'unlicensed' when scala is apache 2 and this once was? HOT 2
- Maven Plugin Validation error? Depends on deprecated compatibility layer HOT 2
- Build error on `sun.*` APIs when `-release` Java version is lower than the execution Java version HOT 2
- Need to update to handle the movement of doxia to apache HOT 6
- Preview compiler features in a mixed Java/Scala Project HOT 12
- Unused 'scalaCompatVersion' flag ? HOT 10
- scala-maven-plugin version for scala-library 2.12.15? HOT 2
- Race condition in sbt-compiler-bridge jar when running multimodule project with -T HOT 3
- Maven 3.9.4 Validation Warnings HOT 2
- Getting object scala in compiler mirror not found issue while running the application using jar HOT 3
- Trouble with installing the Maven plugin in IntelliJ HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scala-maven-plugin.