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

Compiler: fix require relative path resolution #7758

Merged
merged 2 commits into from May 10, 2019

Conversation

@asterite
Copy link
Member

commented May 8, 2019

Fixes #7408

@asterite asterite force-pushed the asterite:bug/crystal-path-relative branch from f02897c to b12e734 May 8, 2019

@asterite

This comment has been minimized.

Copy link
Member Author

commented May 10, 2019

Cool, I thought I implemented something wrong but it turned out we had a couple of invalid require that this PR now catches 💪

end
else
relative_filename = "#{relative_to}/#{filename}"
return unless relative_to.is_a?(String)

This comment has been minimized.

Copy link
@Fryguy

Fryguy May 10, 2019

Contributor

I know this was in the original code, but why not have relative_to be typed to a String right in the signature?

This comment has been minimized.

Copy link
@asterite

asterite May 10, 2019

Author Member

Good point. I will do this, I think it will simplify code (I thought it was being passed other things than String or Nil but it doesn't seem to be the case). Thanks!

This comment has been minimized.

Copy link
@asterite

asterite May 10, 2019

Author Member

Done!

This comment has been minimized.

Copy link
@asterite

asterite May 10, 2019

Author Member

Actually, never mind. This can be done in a separate PR. If somebody wants to do it, please go ahead.

@asterite asterite force-pushed the asterite:bug/crystal-path-relative branch from cce8a54 to 2f53e5b May 10, 2019

@asterite asterite merged commit bbffbe0 into crystal-lang:master May 10, 2019

5 checks passed

ci/circleci: check_format Your tests passed on CircleCI!
Details
ci/circleci: test_darwin Your tests passed on CircleCI!
Details
ci/circleci: test_linux Your tests passed on CircleCI!
Details
ci/circleci: test_linux32 Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@asterite asterite deleted the asterite:bug/crystal-path-relative branch May 10, 2019

@asterite asterite added this to the 0.29.0 milestone May 10, 2019

@bcardiff bcardiff referenced this pull request Jun 3, 2019
5 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.