Skip to content

Allow hyphen - in legal workspace names - #998

Closed
antlauzon wants to merge 1 commit into
bazelbuild:masterfrom
antlauzon:master
Closed

antlauzon wants to merge 1 commit into
bazelbuild:masterfrom
antlauzon:master

Conversation

@antlauzon

Copy link
Copy Markdown

I don't see how directories with a hyphen aren't legal workspaces. Please consider adding support for names with hyphen in them to master or provide a reason why hyphen can't be used.

@googlebot

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@damienmg

damienmg commented Mar 2, 2016

Copy link
Copy Markdown
Contributor

This was a decision following https://docs.google.com/document/d/1skNx5o-8k5-YXUAyEETvr39eKoh9fecJbGUquPh5iy8/preview. Hyphens in directories are problematic in some languages (e.g, python) and should be replaced by _ in workspace names.

@damienmg damienmg closed this Mar 2, 2016
@antlauzon

Copy link
Copy Markdown
Author

What abouit java and npm packages? I think this PR should be better addressed.

@kchodorow

Copy link
Copy Markdown
Contributor

I know this is inconvenient, but hyphens are also not allowed in Java package names.

@antlauzon

Copy link
Copy Markdown
Author

It's extremely inconvenient. For instance, I have a special macro that specifies metadata for NPM tarballs. In it, I now have to do shenanigans like:

target_name = name.replace("-", "_")
metadata['name'] = target_name
url = 'http://registry.npmjs.org/%s/-/%s-%s.tgz' % (name, name, version)
return metadata

Not okay.

@antlauzon

Copy link
Copy Markdown
Author

Another problem is that I can't require any of my node modules from the external directory now without first writing a rule that either a) renames all the directories to change _ to - or b) symlinks everything with a _ to its - cousin. What a mess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants