[jira] [Commented] (FLINK-8847) Modules containing package-info.java are always recompiled
[ https://issues.apache.org/jira/browse/FLINK-8847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16394146#comment-16394146 ] ASF GitHub Bot commented on FLINK-8847: --- Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/5644 > Modules containing package-info.java are always recompiled > -- > > Key: FLINK-8847 > URL: https://issues.apache.org/jira/browse/FLINK-8847 > Project: Flink > Issue Type: Bug > Components: Build System >Affects Versions: 1.3.2, 1.5.0, 1.4.1 >Reporter: Chesnay Schepler >Assignee: Chesnay Schepler >Priority: Minor > Fix For: 1.5.0, 1.4.3 > > > All modules that contain a {{package-info.java}} file (that do not contain > annotations which applies to *all* instances in Flink) will always be > recompiled by the {{maven-compiler-plugin}}. > To detect modified files the compiler compares timestamps of the source and > .class file. In the case of {{package-info.java}} no .class file is created > if it doesn't contain annotations, which the compiler interprets as a missing > .class file. > We can add {{-Xpkginfo:always}} to the compiler configuration to force the > generation of these files to prevent this from happening. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8847) Modules containing package-info.java are always recompiled
[ https://issues.apache.org/jira/browse/FLINK-8847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16392830#comment-16392830 ] ASF GitHub Bot commented on FLINK-8847: --- Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/5644 Looks good. > Modules containing package-info.java are always recompiled > -- > > Key: FLINK-8847 > URL: https://issues.apache.org/jira/browse/FLINK-8847 > Project: Flink > Issue Type: Bug > Components: Build System >Affects Versions: 1.3.2, 1.5.0, 1.4.1 >Reporter: Chesnay Schepler >Assignee: Chesnay Schepler >Priority: Minor > Fix For: 1.5.0, 1.4.3 > > > All modules that contain a {{package-info.java}} file (that do not contain > annotations which applies to *all* instances in Flink) will always be > recompiled by the {{maven-compiler-plugin}}. > To detect modified files the compiler compares timestamps of the source and > .class file. In the case of {{package-info.java}} no .class file is created > if it doesn't contain annotations, which the compiler interprets as a missing > .class file. > We can add {{-Xpkginfo:always}} to the compiler configuration to force the > generation of these files to prevent this from happening. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8847) Modules containing package-info.java are always recompiled
[ https://issues.apache.org/jira/browse/FLINK-8847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16392679#comment-16392679 ] ASF GitHub Bot commented on FLINK-8847: --- Github user kl0u commented on the issue: https://github.com/apache/flink/pull/5644 Thanks @zentol for taking care of it and also mentioning the related issues. LGTM! > Modules containing package-info.java are always recompiled > -- > > Key: FLINK-8847 > URL: https://issues.apache.org/jira/browse/FLINK-8847 > Project: Flink > Issue Type: Bug > Components: Build System >Affects Versions: 1.3.2, 1.5.0, 1.4.1 >Reporter: Chesnay Schepler >Assignee: Chesnay Schepler >Priority: Minor > Fix For: 1.5.0, 1.4.3 > > > All modules that contain a {{package-info.java}} file (that do not contain > annotations which applies to *all* instances in Flink) will always be > recompiled by the {{maven-compiler-plugin}}. > To detect modified files the compiler compares timestamps of the source and > .class file. In the case of {{package-info.java}} no .class file is created > if it doesn't contain annotations, which the compiler interprets as a missing > .class file. > We can add {{-Xpkginfo:always}} to the compiler configuration to force the > generation of these files to prevent this from happening. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8847) Modules containing package-info.java are always recompiled
[ https://issues.apache.org/jira/browse/FLINK-8847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387561#comment-16387561 ] ASF GitHub Bot commented on FLINK-8847: --- GitHub user zentol opened a pull request: https://github.com/apache/flink/pull/5644 [FLINK-8847][build] Prevent unnecessary recompilation ## What is the purpose of the change This PR contains 2 changes to prevent the `maven-compiler-plugin` from recompiling a module that doesn't require it. The `maven-compiler-plugin` will now always create `.class` files for `package-info.java` files. Previously this was only done if the `.java` file contained annotations. Having a `.java` file without a corresponding `.class` file throws of the `maven-compiler-plugin` stale source detection, as described in [MCOMPILER-205](https://issues.apache.org/jira/browse/MCOMPILER-205). Additionally, `useIncrementalCompilation` is set to false which actually enables incremental compilation, as described in [MCOMPILER-209](https://issues.apache.org/jira/browse/MCOMPILER-209). ## Brief change log * create `.class` files for all `package-info.java` files * set `useIncrementalCompilation` to false which actually enables incremental compilation ## Verifying this change Pick any module that contains a `package-info.java` file (like `flink-optimizer`) and run `mvn package ` twice. The plugin should not recompile the module. You can merge this pull request into a Git repository by running: $ git pull https://github.com/zentol/flink 8847 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/5644.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #5644 commit 293795b5e5f57dba07e985be9e46ba2534e91eac Author: zentolDate: 2018-03-06T09:45:25Z [FLINK-8847][build] Always generate .class files for package-info.java commit 92d17feab6cd604fd2bd2be96d6ed35485c13b80 Author: zentol Date: 2018-03-06T10:04:42Z [hotfix][build] Enable incremental compilation > Modules containing package-info.java are always recompiled > -- > > Key: FLINK-8847 > URL: https://issues.apache.org/jira/browse/FLINK-8847 > Project: Flink > Issue Type: Bug > Components: Build System >Affects Versions: 1.3.2, 1.5.0, 1.4.1 >Reporter: Chesnay Schepler >Assignee: Chesnay Schepler >Priority: Minor > Fix For: 1.5.0, 1.4.3 > > > All modules that contain a {{package-info.java}} file (that do not contain > annotations which applies to *all* instances in Flink) will always be > recompiled by the {{maven-compiler-plugin}}. > To detect modified files the compiler compares timestamps of the source and > .class file. In the case of {{package-info.java}} no .class file is created > if it doesn't contain annotations, which the compiler interprets as a missing > .class file. > We can add {{-Xpkginfo:always}} to the compiler configuration to force the > generation of these files to prevent this from happening. -- This message was sent by Atlassian JIRA (v7.6.3#76005)