matlab-actions / run-command

Run MATLAB scripts, functions, and statements.
BSD 3-Clause "New" or "Revised" License
53 stars 11 forks source link

mysterious "Calling inputname from scripts is not supported" regression case since R2021b #18

Closed slayoo closed 2 years ago

slayoo commented 2 years ago

Hello,

First, big thanks for providing the actions! Very useful. We use it regularly in two projects: PySDM (https://github.com/atmos-cloud-sim-uj/PySDM/) and PyMPDATA (http://github.com/atmos-cloud-sim-uj/PyMPDATA/).

Around Oct 7/8, however, in both projects the actions stopped working and the only hint in the logs is a message: " Calling inputname from scripts is not supported". The error points to an unchanged parts of code, same started happening in the two projects.

Here is a still-not-so-minimal reproducer: https://github.com/slayoo/test/ https://github.com/slayoo/test/actions/runs/1331568454

Thanks for any hints, Sylwester

acampbel commented 2 years ago

Hi Sylwester,

I am not sure what ht underlying issue here is, but this may be related to the fact that the latest release (R2021b) was deployed for these actions last week. To confirm, can you try running them on 21a instead of 21b by explicitly requesting the release in the setup-matlab action? If you don't specify anything then you get the latest release, which has now changed, and perhaps there is an incompatibility that needs looking into.

Can you let us know how that goes? Hopefully that should also get your builds running again. Thanks, Andy

slayoo commented 2 years ago

It is a valid workaround (https://github.com/atmos-cloud-sim-uj/PySDM/pull/655/checks?check_run_id=3872414834)! Thank you!

What could be causing the issue? This message ("Calling inputname from scripts is not supported") was showing up in seeming unrelated places in the two projects.

acampbel commented 2 years ago

It is a valid workaround (https://github.com/atmos-cloud-sim-uj/PySDM/pull/655/checks?check_run_id=3872414834)! Thank you!

What could be causing the issue? This message ("Calling inputname from scripts is not supported") was showing up in seeming unrelated places in the two projects.

Good question, at this point I am not sure if it is something specific to what PyMPDATA is doing or something in MATLAB's python interface. I can try to find the right person to look into this error message on our side, but in the meantime anything you can do to remove your code from the equation is going to be very helpful in narrowing down the issue.

slayoo commented 2 years ago

I'll continue reducing the reproducer, meanwhile added a release matrix and disabled fail-fast on the test repo: https://github.com/slayoo/test/actions/runs/1334006765

image
acampbel commented 2 years ago

Hi @slayoo,

Looks like this is a bug that is manifesting in the python interface, and the responsible team is looking into it. Note there is another workaround that should enable this to work in 21b right away, which is to invoke these methods on python objects in a function instead of a script. I see that in the PySDM repo you are creating the readme script from the help content in the markdown file. When you create readme.m, if you create it with "function readme" as the first line then you should not see this bug. It only surfaces in scripts. Note, the examples should still work from the command line as well.

Hope that helps, Andy

slayoo commented 2 years ago

Thank you!