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

Slightly reorganising the test suite to follow its documentation #12835

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

Mbodin
Copy link
Contributor

@Mbodin Mbodin commented Aug 13, 2020

Kind: documentation / infrastructure.

This is a split of PR #12821 containing only the parts touching the documentation and the test suite.

Fixes #10902.

@Mbodin
Copy link
Contributor Author

Mbodin commented Aug 13, 2020

I feel that I shouldn’t squash the first commit with the others: it fixes a separate issue and only touches documentation. Maybe leaving the second commit unsquashed is fine too as it only adds a test and does not reorganise anything?

I think that it is safe to squash the last two, adding @herbelin as co-author. Would that be fine?

@Mbodin Mbodin force-pushed the test-suite-changes branch 2 times, most recently from 08265e6 to cecc9dc Compare August 13, 2020 12:41
@Mbodin
Copy link
Contributor Author

Mbodin commented Aug 13, 2020

(Sorry for the multiple forced-push: I kept getting the wrong commit message for the first commit.)

@SkySkimmer
Copy link
Contributor

The test for #5996 is wrong btw (compare with the examle in the issue)

@Mbodin
Copy link
Contributor Author

Mbodin commented Aug 13, 2020

Good catch! I didn’t change it: I just moved it so that it would be tested by the continuous integration system (it is currently ignored by it).

The current test is as follows:

Goal Type.
  let c := constr:(prod nat nat) in
  let c' := (eval pattern nat in c) in
  let c' := lazymatch c' with ?f _ => f end in
  let c'' := lazymatch c' with fun x : Set => ?f => constr:(forall x : Type, f) end in
  let _ := type of c'' in
  exact c''.
Defined.

It basically corresponds to #5996 (comment) Do you think that it should be like #5996 (comment) instead? I’m afraid that I don’t know anything about #5996 to have an opinion here.

@herbelin
Copy link
Member

The current test is basically one that I cooked at some time. Indeed, it does not fully solve the original issue. I don't know what to do. @SkySkimmer, would you like we add the original example to the file, with a Fail on the Defined, and move the whole file to bugs/opened (thus also keeping the first - current - part of the file as a working example)?

@jashug jashug changed the title Sligthly reorganising the test suite to follow its documentation Slightly reorganising the test suite to follow its documentation Aug 13, 2020
Copy link
Member

@jfehrle jfehrle left a comment

Choose a reason for hiding this comment

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

Approving the doc change. I'll leave it to others to approve the test changes.

These are small changes and somewhat related. There's no code change that affects users. I suggest squashing these commits after review is complete, just before merging.

There's a tradeoff between giving many detailed commits and having a concise, readable commit history. For code changes, we're more careful about not combining unrelated changes into a single commit. This makes the commit history more understandable and it's easier to back out changes if unexpected issues arise afterward.

When I'm submitting a PR with changes that are complex and there may multiple rounds of review, I often put the review-related changes into a new commit, imaginatively names "Review # N" so the reviewers can easily verify the incremental changes. And then squash them just before merging.

doc/sphinx/addendum/extraction.rst Outdated Show resolved Hide resolved
@coqbot
Copy link
Contributor

coqbot commented Aug 14, 2020

For your complete information, the job build:base+async in allow failure mode has failed for commit 7286696: Apply suggestions from code review

Copy link
Member

@herbelin herbelin left a comment

Choose a reason for hiding this comment

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

Looks good and as expected. Shall merge tomorrow if no more comments by then.

@herbelin herbelin self-assigned this Aug 18, 2020
Copy link
Contributor

@SkySkimmer SkySkimmer left a comment

Choose a reason for hiding this comment

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

5996 is still wrong.

:name: Extraction Language

The ability to fix target language is the first and more important
of the extraction options. Default is ``OCaml``.

The JSON output is mostly for development or debugging:
it contains the raw ML term produced as an intermediary target.
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't belong in this PR.

Copy link
Contributor Author

@Mbodin Mbodin Aug 18, 2020

Choose a reason for hiding this comment

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

I agree that there are two separate things in this PR. Should I split it again?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, and then squash.

@SkySkimmer
Copy link
Contributor

@SkySkimmer, would you like we add the original example to the file, with a Fail on the Defined, and move the whole file to bugs/opened (thus also keeping the first - current - part of the file as a working example)?

Sure that sounds fine

@Mbodin
Copy link
Contributor Author

Mbodin commented Aug 18, 2020

I added the original example. Please double-check as I’m not familiar with issue 5996.

@herbelin
Copy link
Member

@SkySkimmer: Do we split the PR again in two? If yes, maybe can we do it ourselves to avoid adding a burden on @Mbodin who already helped a lot?

@jfehrle
Copy link
Member

jfehrle commented Aug 18, 2020

Do we split the PR again in two?

Meaning splitting it into 2 commits, not into 2 PRs? One with the doc change, one with the test changes?

@Mbodin
Copy link
Contributor Author

Mbodin commented Aug 19, 2020

I’m fine with doing it, actually ☺ (I’m learning the way PR works along the way, and I actually did appreciate the learning curve ☺)
I will first try squashing into two commits (with the documentation change, and the test-suite change), then we can split the PR or leave it as-is, depending on which is better for the git history (I don’t have much opinion on which is better).

@SkySkimmer
Copy link
Contributor

I will first try squashing into two commits (with the documentation change, and the test-suite change)

No, you should split first imo

@Mbodin
Copy link
Contributor Author

Mbodin commented Aug 19, 2020

I just did the PR split ☺

…ing the test files.

Co-authored-by: Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>
Co-authored-by: Hugo Herbelin <Hugo.Herbelin@inria.fr>
@coqbot
Copy link
Contributor

coqbot commented Aug 20, 2020

For your complete information, the job test-suite:4.11+trunk+dune in allow failure mode has failed for commit 81ed307: Adding the example of bug #2904 into the test suite, and reorganising the test files.

@herbelin
Copy link
Member

As far as I understand, this is ready. Will then merge tomorrow.

@herbelin herbelin added the needs: test-suite update Test case should be added to / updated in the test-suite. label Aug 24, 2020
@herbelin herbelin added this to the 8.13+beta1 milestone Aug 24, 2020
@herbelin herbelin merged commit d49b9f2 into coq:master Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: test-suite update Test case should be added to / updated in the test-suite.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extraction to JSON is not documented.
5 participants