enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.34k stars 320 forks source link

Separate compilation does not take into account Enso files #8262

Open hubertp opened 10 months ago

hubertp commented 10 months ago

Consider the failure in one of the recent PRs:

 INFO ide_ci::program::command: sbtℹ️ /runner/_work/enso/enso/distribution/lib/Standard/Base/0.0.0-dev/src/Data.enso: error: The module Standard.Base.Data.Enso_Cloud does not exist.
 INFO ide_ci::program::command: sbtℹ️ [error] Test org.enso.interpreter.test.MetaIsAPolyglotTest.typesAreNotInstancesOfThemselves failed: java.lang.reflect.InvocationTargetException: null, took 0.064 sec
 INFO ide_ci::program::command: sbtℹ️ [error]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 INFO ide_ci::program::command: sbtℹ️ [error]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 INFO ide_ci::program::command: sbtℹ️ [error]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 INFO ide_ci::program::command: sbtℹ️ [error]     at java.lang.reflect.Method.invoke(Method.java:568)
 INFO ide_ci::program::command: sbtℹ️ [error]     at org.enso.interpreter.test.ValuesGenerator.invokeWithCache(ValuesGenerator.java:781)
 INFO ide_ci::program::command: sbtℹ️ [error]     at org.enso.interpreter.test.ValuesGenerator.allTypes(ValuesGenerator.java:770)
 INFO ide_ci::program::command: sbtℹ️ [error]     at org.enso.interpreter.test.MetaIsATest.typesAreNotInstancesOfThemselves(MetaIsATest.java:225)
 INFO ide_ci::program::command: sbtℹ️ [error]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 INFO ide_ci::program::command: sbtℹ️ [error]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 INFO ide_ci::program::command: sbtℹ️ [error]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 INFO ide_ci::program::command: sbtℹ️ [error]     at java.lang.reflect.Method.invoke(Method.java:568)
 INFO ide_ci::program::command: sbtℹ️ [error]     ...
 INFO ide_ci::program::command: sbtℹ️ [error] Caused by: org.graalvm.polyglot.PolyglotException: Compilation aborted due to errors.
 INFO ide_ci::program::command: sbtℹ️ [error]     at org.graalvm.polyglot.Value.invokeMember(Value.java:974)
 INFO ide_ci::program::command: sbtℹ️ [error]     at org.enso.interpreter.test.ValuesGenerator.v(ValuesGenerator.java:71)
 INFO ide_ci::program::command: sbtℹ️ [error]     at org.enso.interpreter.test.ValuesGenerator.v(ValuesGenerator.java:60)
 INFO ide_ci::program::command: sbtℹ️ [error]     at org.enso.interpreter.test.ValuesGenerator.typeNumber(ValuesGenerator.java:157)
 INFO ide_ci::program::command: sbtℹ️ [error]     ... 46 more

the problem is that Enso_Cloud is being introduced in a separate PR and is here expected because the runner checkout out the state from that PR. While there have been service register changes to support incremental compilation, they aren't addressing Enso files.

hubertp commented 10 months ago

Related to #7775

radeusgd commented 10 months ago

Can we add a ls /runner/_work/enso/enso/distribution/lib/Standard/Base/0.0.0-dev/src/Data/ to the CI temporarily?

I'd really like to know if our files are in inconsistent state (that would be horribly weird; it would mean that there are some git checkout artifacts) OR if actually the files are not there and it is an issue of the missing file being referenced in some stale IR cache?

radeusgd commented 10 months ago

@mwu-tow Maybe we should by default purge all IR caches on checkout?

I think we should purge the following locations:

radeusgd commented 10 months ago

Maybe let's try purging the mentioned directories when runner starts processing a new task, and we can see if the issue disappear or still persists?

radeusgd commented 10 months ago

I'd also like to see the results of the ls for a few weeks on the CI, so that if the issue ever re-occurs we have some more 'debug' data to understand it (since it is so random, it is very hard to debug in any other way, I imagine)