-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
# is not supported in srcs (duplicate of #374) #2006
Comments
Interesting idea. I added Adding some people who can hopefully provide insight: @ulfjack, @laurentlb, @lberki |
This the general problem of extending the label syntax to accept arbitrary characters in it. I would say dupe of #374 |
Agreed, closing as duplicate. |
Thanks for referencing #374 It seems the problem is identified and the only blocking issue is that the current bazel base might "assume the label is trival" thus a escaping scheme is required. While in case of "#", @laszlocsomor pointed out all test cases passed without other modificiation. So is it ok to add "#" as a short-term solution? |
The ultimate problem is that Bazel cannot address a file that has a # in its name, barely fixing the query pattern won't be enough. |
@damienmg , why not? What prevents us from extending the label syntax to accept |
I am personally worried about all the Google-internal stuff that assumes that labels are of a specific syntax. I think we should nevertheless change it, but not piecemeal (add |
@lberki Current implementation already allow characters like +-@ and bash-like environment treat '#' no different than them. So if we add '#' here:
In either case seems we don't require more-than-one updates to internal stuff. |
Kindly ping on question raised by @laszlocsomor |
Ping |
Changing
I definitely wants to prioritize doing that work, but let's do it 50 times. |
As discussed in OP and verified by @laszlocsomor, modification to validateTargetName only involve adding '#' to PUNCTUATION_REQUIRING_QUOTING. Could you name a few example services would be broken after adding the test? (I assume you're referring some integrating test as unit test is pretty easy to added.) If it's google internal service, wouldn't it be better to simply leave it as is, given it would simply fall into cases described in #2006 (comment)? |
If such a simple change work for you, we can always try to run it with the internal tests, if everything pass then it should be pretty safe. |
Hey, I'm trying to add bazel support for gambit-scheme, while it have a convention that using "#" in its scheme header files:
https://github.com/gambit/gambit/tree/master/lib
As these header files will be dependencies at gambit scheme's compile time, there's no easy workaround by simple renaming them.
It looks that a fix can be achieved by adding '#' into following variable.
bazel/src/main/java/com/google/devtools/build/lib/cmdline/LabelValidator.java
Line 32 in c484f19
Any suggestions? I can send such a fix if that's an acceptable solution.
Thanks
Meng
The text was updated successfully, but these errors were encountered: