Skip to content

Disable check for unsafe flags. #8896

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

Merged
merged 2 commits into from
Jul 9, 2025
Merged

Conversation

dschaefer2
Copy link
Member

@dschaefer2 dschaefer2 commented Jul 4, 2025

As discussed in the Swift forums below, a number of projects require the use of "unsafe" flags. A common example is the use of absolute header include paths set via an environment variable that project consumers agree to use. As such, the flags can be safely used under those circumstances.

This change disables the one line that was doing the check.

We will further study the issue and come up with other mechanisms to ensure the challenges some flags have on quality of the package ecosystem are mitigated.

https://forums.swift.org/t/pitch-disable-checks-for-unsafe-flags-in-swiftpm/80698

As discussed in the Swift forums below, a number of projects
require the use of "unsafe" flags. A common example is the use
of absolute header include paths set via an environment variable
that project consumers agree to use. As such, the flags can be
safely used under those circumstances.

This change disables the one line that was doing the check.

We will further study the issue and come up with other mechanisms
to ensure the challenges some flags have on quality
of the package ecosystem are mitigated.
@dschaefer2
Copy link
Member Author

@swift-ci please test

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Fantastic! Really thankful and looking forward to this change. Thanks Doug and team!

@bkhouri
Copy link
Contributor

bkhouri commented Jul 4, 2025

As discussed in the Swift forums below,

@dschaefer2 Could you please share the forum post?

@dschaefer2
Copy link
Member Author

As discussed in the Swift forums below,

@dschaefer2 Could you please share the forum post?

Oops, forgot to do that in the description. Fixed.

@dschaefer2
Copy link
Member Author

@swift-ci please test Windows

@dschaefer2
Copy link
Member Author

@swift-ci please test self hosted windows

@dschaefer2 dschaefer2 merged commit 376414f into swiftlang:main Jul 9, 2025
6 checks passed
@dschaefer2 dschaefer2 deleted the disable-unsafe branch July 9, 2025 18:51
dschaefer2 added a commit to dschaefer2/swift-package-manager that referenced this pull request Jul 9, 2025
As discussed in the Swift forums below, a number of projects require the
use of "unsafe" flags. A common example is the use of absolute header
include paths set via an environment variable that project consumers
agree to use. As such, the flags can be safely used under those
circumstances.

This change disables the one line that was doing the check.

We will further study the issue and come up with other mechanisms to
ensure the challenges some flags have on quality of the package
ecosystem are mitigated.


https://forums.swift.org/t/pitch-disable-checks-for-unsafe-flags-in-swiftpm/80698
dschaefer2 added a commit that referenced this pull request Jul 17, 2025
Cherry-pick #8896 

As discussed in the Swift forums below, a number of projects require the
use of "unsafe" flags. A common example is the use of absolute header
include paths set via an environment variable that project consumers
agree to use. As such, the flags can be safely used under those
circumstances.

This change disables the one line that was doing the check.

We will further study the issue and come up with other mechanisms to
ensure the challenges some flags have on quality of the package
ecosystem are mitigated.



https://forums.swift.org/t/pitch-disable-checks-for-unsafe-flags-in-swiftpm/80698
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.

5 participants