apache / apache/maven-compiler-plugin
[MCOMPILER-537] Inconsistent behaviour when compiler is forked
- Dominant language
- Java
- Stars
- 261
- Forks
- 191
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 8
Description
**[Sebb](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sebb@apache.org)** opened **[MCOMPILER-537](https://issues.apache.org/jira/browse/MCOMPILER-537?redirect=false)** and commented
Further to MCOMPILER-491, there is another difference between forked and non-forked compiles. Informational messages about deprecation etc are not shown in the forked case.
For example:
$ git clone https://gitbox.apache.org/repos/asf/commons-compress.git --single-branch --branch commons-compress-1.22 --depth 1
$ cd commons-compress
$ mvn clean compile
...
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ commons-compress ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 360 source files to /private/tmp/commons-compress/target/classes
[INFO] /private/tmp/commons-compress/src/main/java/org/apache/commons/compress/harmony/pack200/Archive.java: Some input files use or override a deprecated API.
[INFO] /private/tmp/commons-compress/src/main/java/org/apache/commons/compress/harmony/pack200/Archive.java: Recompile with -Xlint:deprecation for details.
[INFO] /private/tmp/commons-compress/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayoutMap.java: Some input files use unchecked or unsafe operations.
[INFO] /private/tmp/commons-compress/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayoutMap.java: Recompile with -Xlint:unchecked for details.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
...
$ mvn clean compile -Dcommons.compiler.fork=true
...[INFO] Compiling 360 source files to /private/tmp/commons-compress/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
...
---
**Issue Links:**
- [MCOMPILER-491](https://issues.apache.org/jira/browse/MCOMPILER-491) testCompile goal doesn't fail the build when encoding error occurs
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the two commands shown in the report, using the commons-compress 1.22 example, and compare compiler output for forked and non-forked compilation. Investigate the Maven Compiler Plugin's forked compilation path and MCOMPILER-491 for context; done means informational deprecation and unchecked-operation messages are visible in both modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100