Pull Request #47 changed the sources list to be transformed through File.getCanonicalPath().
Additionally, in SbtJsTask.executeSourceFilesJs, a file is transformed by File.getCanonicalPath().
I question the use of .getCanonicalPath() over .getAbsolutePath(). On UNIX environments, .getCanonicalPath() will resolve symbolic links. With the inconsistent usage of .getCanonicalPath() throughout SbtJsTask, I think this causes issues when mapping output files to source files, or trying to locate source/output files relative to some folders.
I have created an example using Play to demonstrate this in practice at objectmastery/canonical-error-example. The example uses a project/subproject setup, with a symbolic link from the main project to the sub project. This reflects a setup I already have working fine on Windows, with a subproject being symbolically linked to by multiple other main projects (code sharing! yay!).
Of course, there's always a chance .getCanonicalPath() is all fine and I'm just doing something strange, so feel free to point that out instead.
Pull Request #47 changed the sources list to be transformed through
File.getCanonicalPath().Additionally, in
SbtJsTask.executeSourceFilesJs, a file is transformed byFile.getCanonicalPath().I question the use of
.getCanonicalPath()over.getAbsolutePath(). On UNIX environments,.getCanonicalPath()will resolve symbolic links. With the inconsistent usage of.getCanonicalPath()throughoutSbtJsTask, I think this causes issues when mapping output files to source files, or trying to locate source/output files relative to some folders.I have created an example using Play to demonstrate this in practice at objectmastery/canonical-error-example. The example uses a project/subproject setup, with a symbolic link from the main project to the sub project. This reflects a setup I already have working fine on Windows, with a subproject being symbolically linked to by multiple other main projects (code sharing! yay!).
Of course, there's always a chance
.getCanonicalPath()is all fine and I'm just doing something strange, so feel free to point that out instead.