Validate scope name components.
Review Request #3893 — Created May 16, 2016 and submitted — Latest diff uploaded
Previously we had a scope (gopkg.in) containing a dot. However dots are
used to nest scopes, so this was potentially ambiguous and a bug waiting
to happen (e.g., this only worked because we created an implicit 'gopkg'
parent scope behind the scenes, which isn't what was intended).
Now we forbid dots, and for uniformity we also require lower-case letters
and dashes instead of underscores.
Invalid scope names are still allowed, but deprecated. In 1.2 they will
This change deprecates gopkg.in and, while we're at it, a couple of other
Unfortunately we can't do this check in one central place, because by the
time that would be possible we already have composite scope names (foo.bar)
which would fail the check. We have to check the individual components before
they get munged together, so it's a little less elegant than I would like.
Not terrible though.
Note that we currently get warnings about check_published_deps, because of
how its deprecation was implemented. But that hack can go away in the next
release, so this is a very temporary warning.
CI passes: http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/branch/PR-3448/