-
Notifications
You must be signed in to change notification settings - Fork 412
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
test(melange): show crash when melange.emit
depends on transitive PPX
#7948
Merged
anmonteiro
merged 3 commits into
ocaml:main
from
anmonteiro:anmonteiro/melange-transitive-ppx-crash
Jun 21, 2023
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Test interaction of melange.emit library ppx dependencies | ||
|
||
$ mkdir lib test ppx | ||
$ cat > dune-project <<EOF | ||
> (lang dune 3.8) | ||
> (package (name mel-subdir)) | ||
> (using melange 0.1) | ||
> EOF | ||
|
||
$ mkdir lib/test | ||
$ touch lib/dune | ||
|
||
$ mkdir lib/impl | ||
$ cat > lib/impl/dune <<EOF | ||
> (library | ||
> (name subdir) | ||
> (modes melange) | ||
> (public_name mel-subdir) | ||
> (preprocess (pps not-present))) | ||
> EOF | ||
$ touch lib/impl/subdir.ml | ||
|
||
$ cat > lib/test/dune <<EOF | ||
> (melange.emit | ||
> (target dist) | ||
> (emit_stdlib false) | ||
> (modules) | ||
> (libraries subdir)) | ||
> EOF | ||
|
||
$ dune build | ||
File "lib/impl/dune", line 5, characters 18-29: | ||
5 | (preprocess (pps not-present))) | ||
^^^^^^^^^^^ | ||
Error: Library "not-present" not found. | ||
-> required by library "mel-subdir" in _build/default/lib/impl | ||
-> required by melange target dist | ||
-> required by alias lib/test/all | ||
-> required by alias default | ||
File "lib/impl/dune", line 5, characters 18-29: | ||
5 | (preprocess (pps not-present))) | ||
^^^^^^^^^^^ | ||
Error: Library "not-present" not found. | ||
-> required by melange target dist | ||
-> required by library "mel-subdir" in _build/default/lib/impl | ||
-> required by _build/default/lib/test/dist/lib/test/.dist.mobjs/melange.js | ||
-> required by alias lib/test/all | ||
-> required by alias default | ||
[1] |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why the error is fixed by not pushing the stack frames.
For reference, the error is:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, i think we need to go to the old approach of shoving the backtrace inside the
Action_builder.fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a new version that exposes
Report_error.format_memo_stack
and uses it to format the error stack trace.