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

Handle local imports with quoted paths #35

Merged
merged 1 commit into from
Apr 16, 2020

Conversation

TimWSpence
Copy link
Collaborator

Handling remote imports with quoted paths is blocked on #34

if (path2.isAbsolute) canonicalize(Classpath(path2))
else canonicalize(Classpath(path.getParent.resolve(path2)))
for {
parent <- LocalFile[F](path)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a big deal, but what do you think about using F.map2 instead of for-comprehensions in cases like this where there's not a data dependency? It's a little more correct, and in my view it also reads a bit more nicely.

@@ -58,6 +65,16 @@ class ImportResolutionSuite extends FunSuite {
assert(resolve(expr) == expected)
}

//TODO - dependent on https://github.com/travisbrown/dhallj/issues/34
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge this for now as it is here. I'll look into failing more reasonably in the parser on quoted URL paths this weekend.

@travisbrown travisbrown merged commit 1425c82 into master Apr 16, 2020
@travisbrown travisbrown deleted the handle-quoted-path-imports branch April 20, 2020 12:04
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

Successfully merging this pull request may close these issues.

2 participants