Skip to content
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

[SR-10966] Warn when someone uses -F/-Fsystem with a path that ends in ".framework" #53355

Closed
belkadan opened this issue Jun 18, 2019 · 5 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project

Comments

@belkadan
Copy link
Contributor

Previous ID SR-10966
Radar None
Original Reporter @belkadan
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Driver, StarterBug
Assignee aasimk (JIRA)
Priority Medium

md5: 01b5bc22058772a2dc95288495705824

Issue Description:

-F (and -Fsystem) allow adding search paths where the compiler can find frameworks, but it's a common mistake to accidentally pass a framework itself with -F, instead of the directory containing it. The compiler should warn on this.

@belkadan
Copy link
Contributor Author

The place to do this is validateArgs in Driver.cpp, following the example of validateCompilationConditionArgs. Maybe validateSearchPathArgs?

@swift-ci
Copy link
Collaborator

Comment by Aasim Kandrikar (JIRA)

I'm currently implementing this feature and was wondering if this message would be better suited as a note than a warning.

@belkadan
Copy link
Contributor Author

Notes always have to be attached to another diagnostic, so that won't work. But stepping back, why would a note be more appropriate?

@swift-ci
Copy link
Collaborator

Comment by Aasim Kandrikar (JIRA)

I guess I misunderstood what a note would be used for. Looking at more examples, a warning seems the way to go.

@swift-ci
Copy link
Collaborator

swift-ci commented Jul 2, 2019

Comment by Aasim Kandrikar (JIRA)

#25906

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project
Projects
None yet
Development

No branches or pull requests

2 participants