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

test case for crazy resolvePath bug #156

Merged
merged 15 commits into from
May 2, 2015
Merged

test case for crazy resolvePath bug #156

merged 15 commits into from
May 2, 2015

Conversation

Rich-Harris
Copy link
Contributor

No fix yet, but a test case for a very niche bug I've encountered. I think what's happening is that the same module is identified two different ways if it's imported by a module that's relative to base versus a module with an absolute path...

@Rich-Harris
Copy link
Contributor Author

This PR now fixes the issue. It involved a spot of refactoring: rather than keeping a moduleLookup and externalModuleLookup object and passing it around, and using import id properties as lookup keys - inherently prone to this sort of bug - the objects representing imports are linked to the module objects themselves. Personally I think it's a little easier to follow the code as a result, though I stopped short of doing a larger scale refactor, as tempting as it was.

Rich-Harris added a commit that referenced this pull request May 2, 2015
test case for crazy resolvePath bug
@Rich-Harris Rich-Harris merged commit 6c3dcb9 into master May 2, 2015
@Rich-Harris Rich-Harris deleted the resolve-path-bug branch May 2, 2015 18:34
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.

1 participant