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 support for --run #57

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add support for --run #57

wants to merge 1 commit into from

Conversation

jonascarpay
Copy link
Member

Initial attempt at #56.

  • Argument handling is provisional; it just checks if the argument list is of the form --run <str>, and if so, tries to run the test.
  • Running the test means parsing into a module name and function name, and then calling nix-instantiate --eval -E "(import ./<moduleName>).<functionName>".
  • I split the Main module into Main.Build and Main.Run.

@considerate
Copy link
Member

In the example I pass null to run the Effect. I think inspecting whether it’s a function and calling the function with null would be a strategy that could work.

@considerate
Copy link
Member

For reference, spago always runs the main function and calls it without any argument (equivalent to calling with null in purenix) for the JS backend.

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.

2 participants