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

hhbc regression: symlinks lead to duplicate definitions #8719

Open
fredemmott opened this issue Jun 18, 2020 · 3 comments
Open

hhbc regression: symlinks lead to duplicate definitions #8719

fredemmott opened this issue Jun 18, 2020 · 3 comments

Comments

@fredemmott
Copy link
Contributor

fredemmott commented Jun 18, 2020

Describe the bug

Symlinks between hack files lead to "More than one with the name "

Standalone code, or other way to reproduce the problem

$ cd $(mktemp -d)
$ cd src
$ echo "function foo(): void {}" > foo.hack
$ ln -s foo.hack bar.hack
$ cd ..
$ hhvm --hphp --target hhbc -l 3 --module src  --output-dir $(pwd)/out

Expected behavior

Seen on 4.61 and below:

fredemmott@fredemmott-fbmbp foo % hhvm --hphp --target hhbc -l 3 --module src  --output-dir $(pwd)/out
running hphp...
parsing inputs...
parsing inputs took 0'00" (35218 us) wall time
creating binary HHBC files...
running HHBBC...
committing units to repo...
running HHBBC took 0'00" (196002 us) wall time
committing units to repo took 0'00" (159245 us) wall time
creating binary HHBC files took 0'00" (210305 us) wall time
all files saved in /tmp/foo/out ...
running hphp took 0'01" (1156975 us) wall time

Actual behavior

Seen on 4.62:

fredemmott@fredemmott-fbmbp foo % hhvm --hphp --target hhbc -l 3 --module src  --output-dir $(pwd)/out
running hphp...
parsing inputs...
parsing inputs took 0'00" (35182 us) wall time
creating binary HHBC files...
running HHBBC...
running HHBBC took 0'00" (4734 us) wall time
creating binary HHBC files took 0'00" (5000 us) wall time
running hphp took 0'00" (858870 us) wall time
std::exception: More than one function with the name foo. In src/foo.hack and src/bar.hack
hphp failed
running hphp took 0'00" (864919 us) wall time
@fredemmott
Copy link
Contributor Author

2020.06.11 is clean, 2020.06.12 is broken

4f76c3b

@fredemmott
Copy link
Contributor Author

T68775322

@fredemmott
Copy link
Contributor Author

fredemmott commented Jun 19, 2020

The fix for this is reasonably likely to intentionally break repo-auth mode if the target of the symlink is not in the repository. Symlinks pointing out the project are pretty bad already as the typechecker will not pay attention to the symlink.

@lexidor @ssandler FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant