Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8257547: Handle multiple prereqs on the same line in deps files #1548

wants to merge 4 commits into from


Copy link

@erikj79 erikj79 commented Dec 1, 2020

After fixing JDK-8256810 and starting to look into backporting it, I discovered more potential failing cases. Certain versions of GCC may sometimes output multiple prerequisite files on the same line. I think the easiest way to handle this new issue is to split such lines.

When splitting lines, we need to make sure to not just split on any space. Some compilers output the : of the rule with a leading space, and already split lines will have a space before the backslash.


  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed


  • JDK-8257547: Handle multiple prereqs on the same line in deps files



$ git fetch pull/1548/head:pull/1548
$ git checkout pull/1548

Copy link

@bridgekeeper bridgekeeper bot commented Dec 1, 2020

👋 Welcome back erikj! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Dec 1, 2020
Copy link

@openjdk openjdk bot commented Dec 1, 2020

@erikj79 The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build label Dec 1, 2020
Copy link

@mlbridge mlbridge bot commented Dec 1, 2020

magicus approved these changes Dec 2, 2020
Copy link

@magicus magicus left a comment

As before, regex is write-only code. :-& But I think this does what you claim it to do. :)

I'm not sure how hard it would be to add unit testing of this function (probably quite tricky), but it's starting to get close to the point were it's worth it.

Copy link

@openjdk openjdk bot commented Dec 2, 2020

@erikj79 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

After integration, the commit message for the final commit will be:

8257547: Handle multiple prereqs on the same line in deps files

Reviewed-by: ihse, tbell

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 28 new commits pushed to the master branch:

  • 3da30e9: 8257241: CDS should not handle disableEagerInitialization for archived lambda proxy classes
  • 7104400: 8257164: Share LambdaForms for VH linkers/invokers
  • 3e89981: 8257623: vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted001/ shouldn't use timeout
  • 93b6ab5: 8256818: SSLSocket that is never bound or connected leaks socket resources
  • 692b273: 8257189: Handle concurrent updates of MH.form better
  • 6704266: 8257565: epsilonBarrierSet.hpp should not include barrierSetAssembler
  • 0b8c780: 8256256: UL should not use heap allocation for output string
  • 2508bc7: 8257140: Crash in JvmtiTagMap::flush_object_free_events()
  • cfb50a9: 8253916: ResourceExhausted/resexhausted001 crashes on Linux-x64
  • 287b829: 8254877: GCLogPrecious::_lock rank constrains what locks you are allowed to have when crashing
  • ... and 18 more:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Dec 2, 2020
Copy link

@tbell29552 tbell29552 left a comment

As @magicus wrote - this is subtle but looks OKAY.

Copy link
Member Author

@erikj79 erikj79 commented Dec 2, 2020

I added a test as suggested. This uncovered some portability issues as the test failed on Macosx. I have modified the fix-deps-file macro even more to make it portable for all the versions of sed we are currently using.

$(ECHO) " $(WORKSPACE_ROOT)/bar \\" >> $(DEPS_FILE).expected
$(ECHO) " $(WORKSPACE_ROOT)/bar/baz \\" >> $(DEPS_FILE).expected
$(ECHO) " /foo/baz" >> $(DEPS_FILE).expected
$(DIFF) $(DEPS_FILE).expected $(DEPS_FILE)
Copy link

@tbell29552 tbell29552 Dec 2, 2020

Does this need to be:
$(DIFF) $(DEPS_FILE).expected $(DEPS_FILE).tmp

Copy link
Member Author

@erikj79 erikj79 Dec 2, 2020

No, the fix-deps-file macro takes file.tmp as input and outputs into file, so $(DEPS_FILE) is the output file from the macro in this case.

Copy link

@tbell29552 tbell29552 Dec 2, 2020


magicus approved these changes Dec 2, 2020
Copy link
Member Author

@erikj79 erikj79 commented Dec 3, 2020


@openjdk openjdk bot closed this Dec 3, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Dec 3, 2020
Copy link

@openjdk openjdk bot commented Dec 3, 2020

@erikj79 Since your change was applied there have been 53 commits pushed to the master branch:

  • c5b32b3: 8256808: com/sun/jdi/ failed with "NullPointerException: Cannot invoke "lib.jdb.Jdb.log(String)" because "this.jdb" is null"
  • 8526947: 6508941: causes VM to crash with video files sporadically
  • 7c7facc: 8257701: Shenandoah: objArrayKlass metadata is not marked with chunked arrays
  • 2b73f99: 8228615: Optional.empty doc should suggest using isEmpty
  • 805d058: 8254699: Suboptimal PreTouchParallelChunkSize defaults and limits
  • e29ee5b: 8257641: Shenandoah: Query is_at_shenandoah_safepoint() from control thread should return false
  • 55f5542: 8026976: ECParameters, Point does not match field size
  • d3f3c32: 8255742: PrintInlining as compiler directive doesn't print virtual calls
  • 6c9482e: 8257561: Some code is not vectorized after 8251925 and 8250607
  • 70517c8: 8257642: CipherByteBufferOverwriteTest copyright issue
  • ... and 43 more:

Your commit was automatically rebased without conflicts.

Pushed as commit 36209b7.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants