Fix erroneous loading of cmis for some module type errors (see #13098)#13099
Merged
Octachron merged 5 commits intoocaml:trunkfrom Apr 16, 2024
Merged
Fix erroneous loading of cmis for some module type errors (see #13098)#13099Octachron merged 5 commits intoocaml:trunkfrom
Octachron merged 5 commits intoocaml:trunkfrom
Conversation
42179b8 to
46c7738
Compare
Octachron
reviewed
Apr 15, 2024
typing/printtyp.mli
Outdated
| (** [wrap_printing_env_error env f] does something else in addition to | ||
| [wrap_printing_env ~error:true env f]: it also wraps all functions | ||
| in the returned [Location.error] value to disable the loading of cmis. | ||
| *) |
Member
There was a problem hiding this comment.
something else is a bit unclear. I would propose
[wrap_printing_env_error env f] ensures that all printing functions in a `Location.error` report
are evaluated within the [wrap_printing_env ~error:true env] context
Contributor
Author
There was a problem hiding this comment.
I adopted your suggestion with the additional sentence (The original call to [f] is also evaluated within that context.).
Octachron
approved these changes
Apr 16, 2024
Member
Octachron
left a comment
There was a problem hiding this comment.
The fix is correct if a bit heavy-handed.
At the same time, this tends to confirm my bias that we want to go away from using Format.formatter -> unit as a partial formatted document implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #13098.
All commits pass the test suite. You can review commit-by-commit if you want to see the regression test (with bad output) in the first commit.
I am a unsure that the test case will be useful in perpetuity — its method for detecting "erroneous loading of cmis" is a bit roundabout. I am open to suggestions here.