Skip to content

Add -scanner-prefix-map-paths to the frontend #82745

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

Conversation

sina-mahdavi
Copy link
Contributor

@sina-mahdavi sina-mahdavi commented Jul 2, 2025

The current command-line option for specifying prefix mappings for the dependency scanner does not handle paths containing equal signs. This PR adds a new option -scanner-prefix-map-paths that has a multiArg format instead of being =-separated and fixes this issue. The old -scanner-prefix-map option is still preserved, but is made driver-only and gets translated to the new option format by the driver.

Corresponding PR on Swift-Driver: swiftlang/swift-driver#1949

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

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

Changes LGTM. I will expect test fixes and new tests to test the option.

@sina-mahdavi sina-mahdavi force-pushed the sina-mahdavi/new-scanner-prefix-map-option branch from a831621 to c5bbdbd Compare July 10, 2025 22:26
@sina-mahdavi
Copy link
Contributor Author

Changes LGTM. I will expect test fixes and new tests to test the option.

Do you have anything in mind that I need to write new tests for except modifying the old tests to use the new option instead? I made the old option driver-only and changed all of the old tests using it to use the new format so I think those should already be covering all of the code that has been modified.

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

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

I think the test should be fine now and the change LGTM.

@sina-mahdavi sina-mahdavi force-pushed the sina-mahdavi/new-scanner-prefix-map-option branch from 065420d to 23bb0e1 Compare July 14, 2025 18:35
@sina-mahdavi
Copy link
Contributor Author

@swift-ci please test

@sina-mahdavi sina-mahdavi force-pushed the sina-mahdavi/new-scanner-prefix-map-option branch from 23bb0e1 to 6243072 Compare July 15, 2025 17:46
@sina-mahdavi sina-mahdavi force-pushed the sina-mahdavi/new-scanner-prefix-map-option branch from 6243072 to 0384347 Compare July 15, 2025 17:47
@sina-mahdavi
Copy link
Contributor Author

@swift-ci please test

@sina-mahdavi
Copy link
Contributor Author

@swift-ci please test macOS platform

@cachemeifyoucan cachemeifyoucan merged commit fbfc7a6 into swiftlang:main Jul 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants