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

package.swift file required to authenticate with aws codeartifact registry #7637

Open
1 task done
tushar1998 opened this issue Jun 5, 2024 · 0 comments
Open
1 task done
Labels

Comments

@tushar1998
Copy link

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI.

Description

I am using a xcode project I don't understand why it needs package.swift file. .xcodeproj handles internally all dependencies !!
To overcome this I always have to make the package.swift which is reduntant as it is only required if you are making a switf package, or cross platform code

Expected behavior

aws codeartifact login --tool swift --domain <domain> --domain-owner <domain-owner> --repository <repo> --namespace <namespace> --region us-west-2

Successfully configured swift to use AWS CodeArtifact repository https://<domain>-<domain-owner>.d.codeartifact.us-west-2.amazonaws.com/swift/<repo>/ 
Login expires in 12 hours at 2024-06-06 07:02:18+05:30

Actual behavior

aws codeartifact login --tool swift --domain <domain> --domain-owner <domain-owner> --repository <repo> --namespace <namespace> --region us-west-2

Command '['swift', 'package-registry', 'set', 'https://<domain>-<domain-owner>.d.codeartifact.us-west-2.amazonaws.com/swift/<repo>/', '--scope', <namespace>]' returned non-zero exit status 1. Stderr from command:
Error: Could not find Package.swift in this directory or any of its parent directories.

Steps to reproduce

  1. Create a xcode project File -> New -> Project
  2. Try using a codeartifact swift package
  3. Follow docs to consume package

Swift Package Manager version/commit hash

5.9

Swift & OS version (output of swift --version ; uname -a)

swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
Darwin Tushars-MacBook-Pro.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64

@tushar1998 tushar1998 added the bug label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant