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

[Rust] Updated module let bindings #3747

Merged
merged 2 commits into from
Feb 10, 2024
Merged

[Rust] Updated module let bindings #3747

merged 2 commits into from
Feb 10, 2024

Conversation

ncave
Copy link
Collaborator

@ncave ncave commented Feb 10, 2024

@zprobinson
Copy link

You had mentioned in #3741 that this transient failure also affects other language compilations (e.g. python).

Can the changes here be repurposed to fix those other issues?

@ncave
Copy link
Collaborator Author

ncave commented Feb 10, 2024

@zprobinson

Can the changes here be repurposed to fix those other issues?

I'm not exactly sure what's causing the sporadic Python CI issues. They're perhaps less frequent.

@zprobinson
Copy link

@zprobinson

Can the changes here be repurposed to fix those other issues?

I'm not exactly sure what's causing the sporadic Python CI issues. They're perhaps less frequent.

Ah, shucks. Hoped maybe there was an opportunity for 2 birds one stone. In any case, thanks again for looking into this!

@MangelMaxime
Copy link
Member

Yes Python errors don't seems to be related to Python runtime but instead something fails something during the Fable compilation. It is always on the same tests and for the same reason:

./../../../tests/Python/TestMisc.fs(1,1): error EXCEPTION: Object reference not set to an instance of an object.
   at Microsoft.FSharp.Collections.Internal.IEnumerator.getCurrent@339[TResult](FSharpFunc`2 f, FSharpRef`1 index, FSharpRef`1 current, Unit unitVar0) in /home/dev/Projects/fsharp/src/FSharp.Core/seq.fs:line 350
   at Microsoft.FSharp.Collections.Internal.IEnumerator.upto@352.System.Collections.Generic.IEnumerator<'U>.get_Current() in /home/dev/Projects/fsharp/src/FSharp.Core/seq.fs:line 353
   at Fable.Transforms.Fable2Python.Helpers.getUniqueIdentifier(String name) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 592
   at Fable.Transforms.Fable2Python.Util.transformObjectExpr(IPythonCompiler com, Context ctx, FSharpList`1 members, Type typ, FSharpOption`1 baseCall) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 2071
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in /home/dev/Projects/fsharp/src/FSharp.Core/local.fs:line 243
   at Fable.Transforms.Fable2Python.Util.transformCallArgs(IPythonCompiler com, Context ctx, CallInfo callInfo) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 2137
   at Fable.Transforms.Fable2Python.Util.transformCall(IPythonCompiler com, Context ctx, FSharpOption`1 range, Expr callee, CallInfo callInfo) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 2272
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in /home/dev/Projects/fsharp/src/FSharp.Core/local.fs:line 236
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in /home/dev/Projects/fsharp/src/FSharp.Core/local.fs:line 241
   at Fable.Transforms.Fable2Python.Util.transformCallArgs(IPythonCompiler com, Context ctx, CallInfo callInfo) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 2137
   at Fable.Transforms.Fable2Python.Util.transformCall(IPythonCompiler com, Context ctx, FSharpOption`1 range, Expr callee, CallInfo callInfo) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 2272
   at Fable.Transforms.Fable2Python.Util.transformCallAsStatements[l](IPythonCompiler com, Context ctx, FSharpOption`1 range, l t, FSharpOption`1 returnStrategy, Expr callee, CallInfo callInfo) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 2331
   at Fable.Transforms.Fable2Python.Util.transformAsStatements(IPythonCompiler com, Context ctx, FSharpOption`1 returnStrategy, Expr expr) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 3332
   at Fable.Transforms.Fable2Python.Util.transformBlock(IPythonCompiler com, Context ctx, FSharpOption`1 ret, Expr expr) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 2382
   at Fable.Transforms.Fable2Python.Util.transformFunction(IPythonCompiler com, Context ctx, FSharpOption`1 name, FSharpList`1 args, Expr body, FSharpSet`1 repeatedGenerics) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 3586
   at Fable.Transforms.Fable2Python.Compiler.PythonCompiler.Fable.Transforms.Fable2Python.IPythonCompiler.TransformFunction(Context ctx, FSharpOption`1 name, FSharpList`1 args, Expr body, FSharpSet`1 generics) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 4550
   at Fable.Transforms.Fable2Python.Annotation.transformFunctionWithAnnotations(IPythonCompiler com, Context ctx, FSharpOption`1 name, FSharpList`1 args, Expr body) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 1093
   at Fable.Transforms.Fable2Python.Util.getMemberArgsAndBody(IPythonCompiler com, Context ctx, MemberKind kind, Boolean hasSpread, FSharpList`1 args, Expr body) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 1497
   at Fable.Transforms.Fable2Python.Util.transformModuleFunction(IPythonCompiler com, Context ctx, MemberFunctionOrValue info, String membName, FSharpList`1 args, Expr body) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 3922
   at Fable.Transforms.Fable2Python.Util.withCurrentScope@4319-3.Invoke(FSharpFunc`2 f) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 4322
   at Microsoft.FSharp.Primitives.Basics.List.collectToFreshConsTail[T,TResult](FSharpFunc`2 f, FSharpList`1 list, FSharpList`1 cons) in /home/dev/Projects/fsharp/src/FSharp.Core/local.fs:line 434
   at Microsoft.FSharp.Primitives.Basics.List.collect[T,TResult](FSharpFunc`2 f, FSharpList`1 list) in /home/dev/Projects/fsharp/src/FSharp.Core/local.fs:line 437
   at Fable.Transforms.Fable2Python.Compiler.transformFile(Compiler com, File file) in /home/runner/work/Fable/Fable/src/Fable.Transforms/Python/Fable2Python.fs:line 4623
   at Fable.Cli.Pipeline.Python.compileFile@337-7.Invoke(Unit unitVar) in /home/runner/work/Fable/Fable/src/Fable.Cli/Pipeline.fs:line 338
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in /home/dev/Projects/fsharp/src/FSharp.Core/async.fs:line 510
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in /home/dev/Projects/fsharp/src/FSharp.Core/async.fs:line 112
Compilation failed
Unhandled exception. SimpleExec.ExitCodeException: The command exited with code 1.
   at SimpleExec.Command.Run(ProcessStartInfo startInfo, Boolean noEcho, String echoPrefix, Func`2 handleExitCode, CancellationToken cancellationToken) in /_/SimpleExec/Command.cs:line [121](https://github.com/fable-compiler/Fable/actions/runs/7857347881/job/21441141231?pr=3747#step:9:122)
   at SimpleExec.Command.Run(String name, String args, String workingDirectory, Boolean noEcho, String echoPrefix, Action`1 configureEnvironment, Boolean createNoWindow, Func`2 handleExitCode, CancellationToken cancellationToken) in /_/SimpleExec/Command.cs:line 54
   at SimpleExec.Command.Fable.Static(CmdLine args, FSharpOption`1 workingDirectory, FSharpOption`1 noEcho, FSharpOption`1 echoPrefix) in /home/runner/work/Fable/Fable/src/Fable.Build/SimpleExec.Extensions.fs:line 26
   at Build.Test.Python.handle(FSharpList`1 args) in /home/runner/work/Fable/Fable/src/Fable.Build/Test/Python.fs:line 62
   at Build.Main.main(String[] argv) in /home/runner/work/Fable/Fable/src/Fable.Build/Main.fs:line [125](https://github.com/fable-compiler/Fable/actions/runs/7857347881/job/21441141231?pr=3747#step:9:126)

I will create an issue to track it, and hopefully something will have an idea on how to fix it.

Copy link

@ncave ncave merged commit c20e78d into fable-compiler:main Feb 10, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explore why Python CI fails from time to time Rust tests fail in dev container locally
3 participants