You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.
It's not entirely clear to me where the breakdown happens, but if you run depstar's build-jar function inside tools.deps's with-dir, you get a classpath relative to user.dir instead -- it reads the correct deps.edn, but the :paths in that file are treated as relative -- to user.dir, not the context directory.
It's likely that this is a bug in both how AOT is handled (unknown -- need to see what :compile-ns :all does) and in the JAR file copying logic that doesn't "fix" relative entries on the classpath.
The text was updated successfully, but these errors were encountered:
TL;DR: tools.build uses a *project-root* dynamic var and when it calls down into t.d.a to calculate a basis, it uses with-dir to pass that context on, so using with-dir in build.clj is... questionable practice. However, that means that depstar's t.b.a-compatible functions jar and uber are not entire compatible since they don't resolve paths via that *project-root* and that still leaves the problem that non-tools.build code that invokes depstar programmatically could use with-dir and mess with depstar's handling of paths.
Probably the "right" solution here is for depstar to also have a "project root" concept and to ensure everything is correctly resolved based on that and then for it to use with-dir to bind that context when calling into t.d.a to calculate a basis and for the t.b.a-compatible API to bind depstar's project root to t.b.a's *project-root*... Potentially a lot of work (for a project that I really want to retire once tools.build has its uber task sorted out!).
It's not entirely clear to me where the breakdown happens, but if you run
depstar
'sbuild-jar
function insidetools.deps
'swith-dir
, you get a classpath relative touser.dir
instead -- it reads the correctdeps.edn
, but the:paths
in that file are treated as relative -- touser.dir
, not the context directory.It's likely that this is a bug in both how AOT is handled (unknown -- need to see what
:compile-ns :all
does) and in the JAR file copying logic that doesn't "fix" relative entries on the classpath.The text was updated successfully, but these errors were encountered: