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

Stdlib: Reorganize build, test and nix setup #1135

Merged
merged 8 commits into from
Jan 19, 2020
Merged

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented Jan 18, 2020

(Resubmission of #1131 with a branch name that doesn’t trip hydra.)

Noteworthy changes:

  • Stdlib sources are in stdlib/src
    tests are in stdlib/test
    docs are in stdlib/doc
    (no more rm $out/*Test.mo)

  • Individual Makefiles in these directories,
    as well as the three examples in stdlib/examples/*

  • In stdlib/tests, auto-generate a test that simply imports
    all stdlib files. This makes sure the stdlib actually compiles
    (was not the case before)

  • Tests and examples use package imports "mo:stdlib/…" to import
    the stdlib, instead of relative paths.
    The Makefiles are set up to point to ./stdlib/src by default. But
    when building via nix, we are building against the stdlib as
    installed by nix

  • More fine-grained nix setup, so when you just change the examples,
    or the tests, the stdlib derivation does not have to be rebuild.

  • Runs the tests for Rx and ActorSpec using wasmtimes

nomeata and others added 8 commits January 17, 2020 17:05
Noteworthy changes:

 * Stdlib sources are in `stdlib/src`
   tests are in `stdlib/test`
   docs are in `stdlib/doc`
   (no more `rm $out/*Test.mo`)

 * Individual Makefiles in these directories,
   as well as the three examples in `stdlib/examples/*`

 * In `stdlib/tests`, auto-generate a test that simply imports
   all stdlib files. This makes sure the stdlib actually compiles
   (was not the case before)

 * Tests and examples use package imports `"mo:stdlib/…"` to import
   the stdlib, instead of relative paths.
   The `Makefile`s are set up to point to `./stdlib/src` by default. But
   when building via nix, we are building against the stdlib as
   installed by nix

 * More fine-grained nix setup, so when you just change the examples,
   or the tests, the `stdlib` derivation does not have to be rebuild.

 * Runs the tests for `Rx` and `ActorSpec` using `wasmtimes`
Co-Authored-By: Gabor Greif <[email protected]>
@nomeata nomeata added the automerge-squash When ready, merge (using squash) label Jan 18, 2020
$(OUTDIR)/profileFastCounts.csv: test/profileFastCounts.mo
$(MOC) $(MOC_OPTIONS) -r test/profileFastCounts.mo > $@

profile-interp: \
Copy link
Contributor

Choose a reason for hiding this comment

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

These are nice candidates for patsubst automation. Till the end of the file...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn’t touch this kinda dead code…

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(Also, this PR is identical to #1131 which was already approved :))

Copy link
Contributor

@ggreif ggreif left a comment

Choose a reason for hiding this comment

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

Let's go!

@mergify mergify bot merged commit 6499a7a into master Jan 19, 2020
@mergify mergify bot deleted the joachim/stdlib-reorg branch January 19, 2020 22:26
@mergify mergify bot removed the automerge-squash When ready, merge (using squash) label Jan 19, 2020
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