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

Unresolvable diagnostics for access control on import specifiers #79176

Open
compnerd opened this issue Feb 6, 2025 · 2 comments
Open

Unresolvable diagnostics for access control on import specifiers #79176

compnerd opened this issue Feb 6, 2025 · 2 comments
Labels
access control Feature → modifiers: Access control and access levels bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. import Feature → declarations: `import` declarations triage needed This issue needs more specific labels

Comments

@compnerd
Copy link
Member

compnerd commented Feb 6, 2025

Description

It is impossible to reconcile the diagnostics emitted for access control on imports.

Reproduction

package import typealias SWLLBuild.llbuild_pid_t
public import typealias SWLLBuild.ProcessDelegate
@_exported public import struct SWBLLBuild.CommandExtendedResult

package class TaskProcessDelegate: ProcessDelegate {
  package func processStarted(pid: llbuild_pid_t?) {
  }
}

Expected behavior

You should be able to specify the minimally visible specifier for the types.

  1. Module 'SWBLLBuild' is imported as 'public' from the same file; this 'package' access level will be ignored
  2. Public import of 'SWBLLBuild' was not used in public declarations or inlinable code

Environment

swiftc -version
Swift version 6.2-dev (LLVM 6447c07cd7bd63f, Swift d9e07280e43d548)
Target: x86_64-unknown-windows-msvc

Additional information

No response

@compnerd compnerd added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels access control Feature → modifiers: Access control and access levels import Feature → declarations: `import` declarations labels Feb 6, 2025
@compnerd
Copy link
Member Author

compnerd commented Feb 6, 2025

CC: @artemcm @tshortli @elsh

@tshortli
Copy link
Contributor

tshortli commented Feb 6, 2025

You're looking for @xymus :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
access control Feature → modifiers: Access control and access levels bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. import Feature → declarations: `import` declarations triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

2 participants