You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Require an implicit package member directory to be a valid identifier
Summary:
# Context
Each direct child directory `D` of an implicit package family's `path` denotes a
synthesized member package named `F.D`. Any directory name was accepted, which
means a name that cannot work as a package name still produced one.
Dotted names are the case that actually breaks. A directory `proto.v1` yields the
member name `prototypes.proto.v1`, and resolving a name back to a family and
member splits on `.`, so the name does not round-trip cleanly.
# Solution
Require a member directory name to be a valid Hack identifier. A directory that
is not one denotes no member package, and a file inside it is reported with a new
`Naming[2136]`.
The predicate comes from the `hack_name` crate added earlier in this stack, so
the check shares the lexer's definition of a name rather than carrying a copy
that can drift.
Reviewed By: madgen
Differential Revision: D114386952
fbshipit-source-id: d94136b79671d51f2ecf27291a7950f522c1b593
0 commit comments