Skip to content

Call getCanonicalPath instead of getAbsolutePath #18

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

Merged
merged 1 commit into from
May 5, 2016

Conversation

lloydmeta
Copy link
Contributor

@lloydmeta lloydmeta commented May 5, 2016

Allows us to relativize when basePath is provided as a relative path.

This is useful when we have to work with "schims" for supporting functionality across different Scala/ScalaJS versions that pull in sources from paths relative to the base directory, like in sourcecde. Some SBT plugins rely on this function to tell whether or not a file is in a directory or not.

Allows us to relativize when basePath is provided as a relative path
@eed3si9n
Copy link
Member

eed3si9n commented May 5, 2016

LGTM

@eed3si9n eed3si9n merged commit 03f6050 into sbt:1.0 May 5, 2016
@lloydmeta lloydmeta deleted the feature/relativize-to-getCanonical branch May 5, 2016 04:12
@gslowikowski
Copy link

Hi.
I have a question.

In scoverage plugin we have problem with calculating source files paths relative to source root directories they are inside for reporting purposes (see this and this).

Our issue is not resolved yet. It's in common code used by SBT, Maven and Gradle plugins, so it's important to have working solution for all contexts. SBT 0.13.x didn't canonize paths and I personally was against canonizing paths in our code because of:

  • additional overhead
  • showing real paths instead of symlinks

My question is, will SBT 1.0 canonize:

  • source root paths,
  • source files paths?

I don't know where the changed methods are used. Can I test it somehow?

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.

3 participants