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

Detect outdated launcher #10779

Merged
merged 7 commits into from
Aug 16, 2024
Merged

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Aug 8, 2024

Pull Request Description

When any of the JARs is older than the main executable, print a warning and switch to JVM mode.

Important Notes

The base is obtained by getCodeSource().getLocation(). In case of JVM mode, it is a JAR - e.g. not executable file. In case of native image launcher, it is the executable file - e.g. base.canExecute() returns true. As such the check is only performed in native image launcher.

Checklist

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

  • All code follows the
    Java,
  • Manually verified to work

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

Looks like the CI is affected by this change:

Thanks to that two tests are running in JVM mode instead of NI mode...

@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label Aug 12, 2024

var assertsOn = false;
assert assertsOn = true;
if (assertsOn) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This "transfer of assertion mode" is now causing following failure, @Akirathan:

Execution finished with an error: java.lang.AssertionError
         at <java> org.enso.runtime/org.enso.interpreter.runtime.warning.WithWarnings.<init>(WithWarnings.java:82)
         at <java> org.enso.runtime/org.enso.interpreter.runtime.warning.AppendWarningNode.doObjectMultipleWarningsHashMap(AppendWarningNode.java:120)
         at <java> org.enso.runtime/org.enso.interpreter.runtime.warning.AppendWarningNodeGen.executeAndSpecialize(AppendWarningNodeGen.java:318)
         at <java> org.enso.runtime/org.enso.interpreter.runtime.warning.AppendWarningNodeGen.executeAppend(AppendWarningNodeGen.java:193)
         at <java> org.enso.runtime/org.enso.interpreter.runtime.data.atom.InstantiateNode.doExecute(InstantiateNode.java:102)
         at <java> org.enso.runtime/org.enso.interpreter.runtime.data.atom.InstantiateNodeGen.executeAndSpecialize(InstantiateNodeGen.java:95)
         at <java> org.enso.runtime/org.enso.interpreter.runtime.data.atom.InstantiateNodeGen.executeGeneric(InstantiateNodeGen.java:76)
         at <java> org.enso.runtime/org.enso.interpreter.node.callable.function.BlockNode.executeGeneric(BlockNode.java:54)
         at <java> org.enso.runtime/org.enso.interpreter.node.ClosureRootNode.execute(ClosureRootNode.java:85)
         at <enso> Data.Value(Internal)
         at <enso> Data.type.new(src/Decimal_Benchmark.enso:30:9-180)
         at <enso> Decimal_Benchmark.collect_benches.Decimal_Benchmark.collect_benches<arg-1>(src/Decimal_Benchmark.enso:37:29-42)

the 5575d88 change should fix the problem.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alas, that fix leads to this error:

️ Execution finished with an error: java.lang.AssertionError
 ️at <java> org.enso.interpreter.runtime.warning.WithWarnings.<init>(WithWarnings.java:84)
 ️at <java> org.enso.interpreter.runtime.warning.AppendWarningNode.doWithWarnMultipleWarningsHashMap(AppendWarningNode.java:140)
  at <java> org.enso.interpreter.runtime.warning.AppendWarningNodeGen.executeAndSpecialize(AppendWarningNodeGen.java:345)
  at <java> org.enso.interpreter.runtime.warning.AppendWarningNodeGen.executeAppend(AppendWarningNodeGen.java:193)
  at <java> org.enso.interpreter.node.callable.InvokeMethodNode.doWarning(InvokeMethodNode.java:479)
 ️at <java> org.enso.interpreter.node.callable.InvokeMethodNodeGen.executeAndSpecialize(InvokeMethodNodeGen.java:781)
 ️at <java> org.enso.interpreter.node.callable.InvokeMethodNodeGen.execute(InvokeMethodNodeGen.java:533)

let's assume 0b9a49b fixes both - the instantiate and the invoke case.

@enso-bot
Copy link

enso-bot bot commented Aug 14, 2024

Jaroslav Tulach reports a new STANDUP for yesterday (2024-08-13):

Progress: - Fixing AssertionError: #10779 (comment)

@JaroslavTulach JaroslavTulach removed the CI: Ready to merge This PR is eligible for automatic merge label Aug 14, 2024
@enso-bot
Copy link

enso-bot bot commented Aug 15, 2024

Jaroslav Tulach reports a new STANDUP for yesterday (2024-08-14):

Progress: - merging and adjusting to comments: #10779 (comment)

@JaroslavTulach JaroslavTulach force-pushed the wip/jtulach/DetectOutdatedLauncher branch from 0ce6d9f to 0b9a49b Compare August 15, 2024 07:55
@enso-bot
Copy link

enso-bot bot commented Aug 16, 2024

Jaroslav Tulach reports a new STANDUP for yesterday (2024-08-15):

Progress: - failure with max warnings limit: 0ce6d9f

  • analyzing ydoc-server/buildNativeImage: It should be finished by 2024-08-15.

@JaroslavTulach JaroslavTulach merged commit 8e76595 into develop Aug 16, 2024
41 checks passed
@JaroslavTulach JaroslavTulach deleted the wip/jtulach/DetectOutdatedLauncher branch August 16, 2024 07:37
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants