Comments (9)
#61 by itself will break us internally. There are a couple places I know of where I "cheat" to pass space-separated string arguments on a single line, and that change will quote them incorrectly.
However, that cheat should be unnecessary now because of some other improvements to the Args
APIs, so I'll make the necessary changes internally tomorrow and run it against our CI.
from rules_swift.
Actually it looks like clang doesn't support this either, so I assume this was intentional on the Swift side and we should fix it here
from rules_swift.
I commented on the Swift bug you linked. The standalone example is working as expected, because there aren't quotes around the filename.
For Swift builds specifically, if you can grab one of the params files that Bazel creates and show that a path with a space in it isn't being quoted, that would be good to know. If that's the case, it's not a rules_swift bug, but a Bazel bug. We just use the Args
API to add files to the argument list, and it's up to that object to quote/escape things correctly (if spaces in filenames are even meant to be supported; I tend to avoid them because they always cause problems).
from rules_swift.
For Swift builds specifically, if you can grab one of the params files that Bazel creates and show that a path with a space in it isn't being quoted, that would be good to know.
Yes this is the case now.
if spaces in filenames are even meant to be supported; I tend to avoid them because they always cause problems
I agree but it still seems like something we should fix here.
But it sounds like I should move this issue to bazel?
from rules_swift.
But it sounds like I should move this issue to bazel?
Yes, please do. If the intent is for params files generated by Args
to support spaces in paths, then it will need to be fixed there.
from rules_swift.
Filed here bazelbuild/bazel#6224
from rules_swift.
@allevato why compile_args.set_param_file_format("multiline")
? The default param file format ("shell"
) would solve this problem, would it break other things?
from rules_swift.
Changing this from multiline
to shell
does seem to fix it for us. I'm not sure what other implications that has though. The files end up quoted in this case.
from rules_swift.
Based on the documentation here https://docs.bazel.build/versions/master/skylark/lib/Args.html#set_param_file_format it seems like that might be the intention. I've submitted a PR here assuming that this is a fix we should do here #61
from rules_swift.
Related Issues (20)
- Error in new_objc_provider: Key 'linkopt' no longer supported in ObjcProvider HOT 1
- Error: There is no configuration fragment named 'swift'. Available fragments: 'platform', 'coverage', 'bazel_py', 'android', 'bazel_android', 'apple', 'cpp', 'java', 'j2objc', 'objc', 'proto', 'py' HOT 1
- Duplicate symbol error when migrating to bzlmod HOT 4
- Error adding "apple_core_data_model" dependency to "swift_library" HOT 10
- CC_Library without a tag does not generate a ModuleMap HOT 6
- 'apple_cc_toolchain' is not defined in CI at Bazel@HEAD HOT 1
- Swift Macro - cc_wrapper.sh failed: error executing CppLink command HOT 6
- [Feature Request] Mixed language(C and Swift) swift_library support HOT 4
- Umbrella `objc_library` in `experimental_mixed_language_library` produces malformed `.swift.modulemap` HOT 3
- "Operation not permitted" when switching to `-swift.emit_swiftsourceinfo`, `swift.emit_swiftdoc`
- `swift.vfsoverlay` breaks `-strict-concurrency` checking HOT 4
- Add example of Swift <--> C++ interop HOT 3
- swift_rules_extra_dependencies() fails with rules_proto 6.0.0
- Add `@build_bazel_rules_swift//swift:defs.bzl` HOT 2
- Rename workspace name to `rules_swift` HOT 1
- Unable to compile Swift files with system-provided Swift Macro like #Preview when sandboxing is enabled
- Remove direct uses of :protoc binary HOT 3
- XCode SDK's aren't visible in Sandboxed mode HOT 3
- Rules Swift Package Manager transitive deps no longer compile correctly
- Obtaining a Backtrace after swift_test failure HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_swift.