Open atom2ueki opened 1 year ago
Swift plugins aren't allowed to make network calls for security reasons. Remote configuration isn't currently possible for plugins because of this.
Worth mentioning that I have built a BuildToolPlugin
which can perform network request through a shell script:
.prebuildCommand(
displayName: "Download Fonts",
executable: context.package.directory.appending("download_fonts.sh"),
arguments: [outputDirectory],
outputFilesDirectory: outputDirectory
Might also add that although when building using Xcode I get the same error as @atom2ueki.
When executing using xcodebuild, my remote config is downloaded and placed in the cache:
Granted the build doesn't succeed:
❌ error: YML Parsing Error: 39:20428: error: scanner: mapping values are not allowed in this context:
Just thought it worth mentioning.
I just ran into this issue again, and it looks like as of SwiftPM 5.9 a plugin can add a permission to allow network connections: https://developer.apple.com/documentation/packagedescription/pluginpermission/allownetworkconnections(scope:reason:)
I just ran into this issue again, and it looks like as of SwiftPM 5.9 a plugin can add a permission to allow network connections: https://developer.apple.com/documentation/packagedescription/pluginpermission/allownetworkconnections(scope:reason:)
This permission can only be added to Command Plugins. This issue is about Build Tool Plugins though.
New Issue Checklist
Describe the bug
When I try to use SwiftLint SPM plugin with my
Package.swift
project, load local non-nested configure is fine, but when I add parent_config, it seems got write permission issue when resolve the remote urlif I'm not wrong it hit here, because when running spm build command can't caching to rootDir as the default configure.
Complete output when running SwiftLint, including the stack trace and command used
Environment
swiftlint version
to be sure)? 0.50.3xcodebuild -version
)? Version 14.2 (14C18)echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. No, the issue is not related to rule itself, it related to load configratiion