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

tests: clean up some tests to avoid build error with stale output #7355

Merged
merged 3 commits into from
Apr 2, 2025

Conversation

aspeddro
Copy link
Contributor

No description provided.

@aspeddro aspeddro requested a review from cometkim March 24, 2025 22:26
Copy link
Member

@cometkim cometkim left a comment

Choose a reason for hiding this comment

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

I don't think this is a good place to do the clean task.

The pipeline is managed by the Makefile: test -> lib (build test) -> build (build compiler)

If the goal is to get a clean build before running tests, you should use a config file instead of inserting the task into the middle of the test script. You could also make lib always guarantee that, but I don't prefer either because I want incremental builds during development.

There is no need for additional dependencies or script, since rescript clean does exactly what you need.

@aspeddro
Copy link
Contributor Author

Ok, but currently some tests don't have incremental compilation. I think what happened was that they forgot to add a step to clean tests/build_tests

Mocha test run rescript clean. I can change to rescript clean

@cristianoc
Copy link
Collaborator

Ok, but currently some tests don't have incremental compilation. I think what happened was that they forgot to add a step to clean tests/build_tests

Mocha test run rescript clean. I can change to rescript clean

A bunch of those tests self clean.
Being some of the oldest tests around, these are most outdated one.
If you know which ones are problematic, one can add a clean step as e.g. in build_tests/cycle1/input.js.

@aspeddro aspeddro force-pushed the cleanup-stale-build branch from 18de458 to bb4ba65 Compare March 26, 2025 14:55
@aspeddro aspeddro changed the title tests: always delete stale output (lib folder) tests: clean up some tests to avoid build error with stale output Mar 26, 2025
@aspeddro
Copy link
Contributor Author

I added a cleaning step in the tests where I saw the most errors with stale outputs.

@aspeddro aspeddro requested a review from cometkim April 1, 2025 15:06
@cometkim cometkim merged commit 41e41b9 into rescript-lang:master Apr 2, 2025
20 checks passed
@cometkim
Copy link
Member

cometkim commented Apr 2, 2025

Thanks @aspeddro

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