-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Correctly describe the origin of invalid specs, e.g. --paths-from
#15730
Correctly describe the origin of invalid specs, e.g. --paths-from
#15730
Conversation
[ci skip-build-wheels] [ci skip-rust] [ci skip-rust]
@@ -166,7 +166,9 @@ class _ParseOneBSPMappingRequest: | |||
async def parse_one_bsp_mapping(request: _ParseOneBSPMappingRequest) -> BSPBuildTargetInternal: | |||
specs_parser = SpecsParser() | |||
specs = specs_parser.parse_specs( | |||
request.definition.addresses, convert_dir_literal_to_address_literal=False | |||
request.definition.addresses, | |||
description_of_origin=f"the BSP mapping {request.name}", |
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.
@tdyas is this an accurate description?
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.
yes, looks accurate
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.
Sweet stuff.
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
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.
Great: thanks!
I can't reproduce the failing test that caused it. Ran the tests 10 times. # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
Before:
After:
It was a lie to hardcode "CLI arguments".
Most of these rules should never error because we only error if the directory of the CLI specs do not exist, and we programmatically compute the specs based on already existing targets. But still, this gives us much better debugging if those assumptions are violated.
This also unblocks us from #14468. The
Specs
will be able to pass down theirdescription_of_origin
toAddressInput
for much better errors with invalidAddressLiteralSpec
s.[ci skip-build-wheels]