-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[CLI] Add compiler-message-format-json
experiment value to aptos move compile
and aptos move lint
#15540
[CLI] Add compiler-message-format-json
experiment value to aptos move compile
and aptos move lint
#15540
Conversation
⏱️ 11s total CI duration on this PR
|
--message-format
to aptos move compile
and aptos move lint
message-format-json
experiment value to aptos move compile
and aptos move lint
message-format-json
experiment value to aptos move compile
and aptos move lint
compiler-message-format-json
experiment value to aptos move compile
and aptos move lint
compiler-message-format-json
experiment value to aptos move compile
and aptos move lint
compiler-message-format-json
experiment value to aptos move compile
and aptos move lint
compiler-message-format-json
experiment value to aptos move compile
and aptos move lint
compiler-message-format-json
experiment value to aptos move compile
and aptos move lint
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 have left some more comments, but this is looking good in general.
Could you please update the PR description regarding whether this is still a WIP, and any notes on testing?
third_party/move/testing-infra/transactional-test-runner/src/framework.rs
Outdated
Show resolved
Hide resolved
third_party/move/tools/move-package/src/compilation/compiled_package.rs
Outdated
Show resolved
Hide resolved
third_party/move/move-compiler-v2/tests/compiler-message-format-json/errors.exp
Outdated
Show resolved
Hide resolved
@vineethk Thanks for the review! I addressed your comments, changed the description and added some tests. |
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.
LGTM!
@mkurnikov Looks like the lint checks are failing because of missing license headers: https://github.com/aptos-labs/aptos-core/actions/runs/12445881990/job/34799996744?pr=15540. Could you please add the following to the top of the newly added source files:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
…ove compile` and `aptos move lint` (#15540)
Description
Adds an compiler experiment flag
compiler-message-format-json
to replacecodespan
formatted compiler errors with structured unformatted JSON.It's supposed to only be consumed by the other tools like IDEs.
How Has This Been Tested?
Added a couple of tests to
move-compiler-v2/tests/compiler-message-format-json
.Key Areas to Review
Adds
Emitter
trait, which has two impls,HumanEmitter
andJsonEmitter
.HumanEmitter
just wraps the existingcodespan_reporting::term::emit()
calls, and it's a default, so there should be no changes to the existing tests.JsonEmitter
serializes compiler errors in the json format for external tools (i.e. Move on Aptos Intellij plugin) to use. It's enabled with theExperiment::MESSAGE_FORMAT_JSON
.Type of Change
Which Components or Systems Does This Change Impact?
Checklist