Validate scope name components.

Review Request #3893 - Created May 16, 2016 and submitted

Information
Benjy Weinberger
pants
Reviewers
pants-reviews
jsirois, stuhood

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
become errors.

This change deprecates gopkg.in and, while we're at it, a couple of other
go-related scopes.

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/

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Nick Howard (Twitter)
Stu Hood
Nick Howard (Twitter)
Benjy Weinberger
Review request changed

Status: Closed (submitted)

Change Summary:

e0d88dc6b7d25a7a4ee188419bff7e0ff367561b

Benjy Weinberger

Submitted. Thanks Stu and Nick!

Loading...