Skip to content
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

Allow hyphen - in legal workspace names #998

Closed
wants to merge 1 commit into from

Conversation

antlauzon
Copy link

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

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
Copy link
Contributor

damienmg commented Mar 2, 2016

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
Author

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

@kchodorow
Copy link
Contributor

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

@antlauzon
Copy link
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
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