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 initial regression script #2719

Merged
merged 2 commits into from
Jan 17, 2023
Merged

Add initial regression script #2719

merged 2 commits into from
Jan 17, 2023

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Jan 16, 2023

This is the first attempt to introduce some more regression testing.
The idea is to clone a repository (that already uses Fantomas), build it, and format it using the latest code. Afterwards, build the repository again to verify that still works.

This isn't a silver bullet and does not detect absolutely everything, but I think it is a start.
We could run this manually before we are going to release a new version. I don't think we want this before every PR.

All feedback is welcome.

Todo:

@nojaf nojaf requested a review from dawedawe January 16, 2023 10:04

// Run repositories
for repo in repositories do
(run repo).Wait()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This Wait bit might be sacrilege, please let me know what the idiomatic thing to do here in F# is.

Copy link
Member

Choose a reason for hiding this comment

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

How about

let t = run repo
t |> Async.AwaitTask |> Async.RunSynchronously

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought of that but it feels a bit strange to move to the Async world at the end for this.
As the tasks are hot, I think staying in the Task world makes more sense.

@dawedawe
Copy link
Member

I like it a lot and yes, running this manually before a release or whenever one feels like it should be enough as it's a rather big work load.

@nojaf nojaf marked this pull request as ready for review January 17, 2023 08:10
@nojaf
Copy link
Contributor Author

nojaf commented Jan 17, 2023

I'm going to merge this to be able to try out the GitHub Action, we can refine the script later on.

@nojaf nojaf merged commit 911dc3a into fsprojects:main Jan 17, 2023
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.

Optional constructor arguments are lost
2 participants