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

Canonicalize the temporary directory files #8879

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Jan 27, 2024

Pull Request Description

Due to some Mac OS X symlinks trickery we need to canonicalize files created by @Rule TemporaryFolder to compare them for equality.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Java,
    style guides.
  • All code has been tested:
    • Unit tests are now passing on Mac OS X as well

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Jan 27, 2024
@JaroslavTulach JaroslavTulach self-assigned this Jan 27, 2024
@JaroslavTulach
Copy link
Member Author

Sample failure to be fixed:

 [error] Test org.enso.runner.UtilsTest.detectParentProject failed: java.lang.AssertionError: Source detected expected:</var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T/junit2482077137355453939/dir/prj/src/some/file/Main.enso> but was:</private/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T/junit2482077137355453939/dir/prj/src/some/file/Main.enso>, took 0.218 sec
  [error]     at org.enso.runner.UtilsTest.detectParentProject(UtilsTest.java:32)
  [error]     at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
  [error]     at java.lang.reflect.Method.invoke(Method.java:580)
  [error]     ...
  [error] Test org.enso.runner.UtilsTest.specifyProjectDir failed: java.lang.AssertionError: Source is the project expected:</var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T/junit6919679684730158327/dir/prj> but was:</private/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T/junit6919679684730158327/dir/prj>, took 0.005 sec
  [error]     at org.enso.runner.UtilsTest.specifyProjectDir(UtilsTest.java:49)
  [error]     at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
  [error]     at java.lang.reflect.Method.invoke(Method.java:580)
  [error]     ...
  [error] Test org.enso.runner.UtilsTest.dontDetectParentProjectWithoutSrcDir failed: java.lang.AssertionError: Source detected expected:</var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T/junit18314718692805380716/dir/prj/nosrc/some/file/Main.enso> but was:</private/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T/junit18314718692805380716/dir/prj/nosrc/some/file/Main.enso>, took 0.008 sec
  [error]     at org.enso.runner.UtilsTest.dontDetectParentProjectWithoutSrcDir(UtilsTest.java:100)
  [error]     at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
  [error]     at java.lang.reflect.Method.invoke(Method.java:580)
  [error]     ...
  [error] Test org.enso.runner.UtilsTest.dontDetectParentProjectIfMissingPackageYaml failed: java.lang.AssertionError: Source detected expected:</var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T/junit2179366960683506777/dir/prj/src/some/file/Main.enso> but was:</private/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T/junit2179366960683506777/dir/prj/src/some/file/Main.enso>, took 0.009 sec
  [error]     at org.enso.runner.UtilsTest.dontDetectParentProjectIfMissingPackageYaml(UtilsTest.java:83)
  [error]     at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
  [error]     at java.lang.reflect.Method.invoke(Method.java:580)
  [error]     ...
  [error] Test org.enso.runner.UtilsTest.specifyProjectAndFile failed: java.lang.AssertionError: Source is kept expected:</var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T/junit3060233163304576085/Standalone.enso> but was:</private/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T/junit3060233163304576085/Standalone.enso>, took 0.006 sec
  [error]     at org.enso.runner.UtilsTest.specifyProjectAndFile(UtilsTest.java:66)
  [error]     at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
  [error]     at java.lang.reflect.Method.invoke(Method.java:580)
  [error]     ...

@JaroslavTulach
Copy link
Member Author

JaroslavTulach commented Jan 27, 2024

Mac CI run is green. Marking ready to merge and waiting for a code owner blessing.

@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label Jan 27, 2024
@mergify mergify bot merged commit 0842458 into develop Jan 29, 2024
30 checks passed
@mergify mergify bot deleted the wip/jtulach/CanonicalizeForMacOSX branch January 29, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants