Coder Social home page Coder Social logo

Comments (9)

allevato avatar allevato commented on July 20, 2024 1

#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.

keith avatar keith commented on July 20, 2024

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.

allevato avatar allevato commented on July 20, 2024

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.

keith avatar keith commented on July 20, 2024

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.

allevato avatar allevato commented on July 20, 2024

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.

keith avatar keith commented on July 20, 2024

Filed here bazelbuild/bazel#6224

from rules_swift.

kastiglione avatar kastiglione commented on July 20, 2024

@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.

keith avatar keith commented on July 20, 2024

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.

keith avatar keith commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.