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

add module to RuntimeGeneratedFunctions call #2259

Merged
merged 4 commits into from
Sep 20, 2023
Merged

Conversation

xtalax
Copy link
Member

@xtalax xtalax commented Sep 14, 2023

Again I think my formatter is broken as it keeps trying to format your stuff, don't know what's going on here

p = ps isa SciMLBase.NullParameters ? [] : map(a -> a.first, ps)
args = vcat(DestructuredArgs(p), args)
ex = Func(args, [], eq.rhs) |> toexpr
eq.lhs => drop_expr(RuntimeGeneratedFunction(@__MODULE__, @__MODULE__, ex))
Copy link
Member

Choose a reason for hiding this comment

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

This should not hardcoded. Also, I think only the first argument is necessary for correct precompilation caching.

Copy link
Member Author

@xtalax xtalax Sep 14, 2023

Choose a reason for hiding this comment

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

This actually doesn't fix the bug I have, I may need to pass down @MODULE from PDESysLibrary as the cache module, this function needs all 3 arguments though

Copy link
Member

Choose a reason for hiding this comment

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

You can use the @RuntimeGeneratedFunction macro which only needs two.

@YingboMa
Copy link
Member

How do you run your formatter? Also, do you have a forced CRLF setting if you are using Windows?

@xtalax
Copy link
Member Author

xtalax commented Sep 14, 2023

It appears to run automatically with VSCode, I am on MacOS

@YingboMa
Copy link
Member

Have you tried to run it in a vanilla Julia REPL that you start from a terminal?

@YingboMa YingboMa merged commit 68dfae6 into SciML:master Sep 20, 2023
27 of 31 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.

3 participants