question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Excluding pack from project dependencies

See original GitHub issue

A discussion on Clojurians Slack yesterday got me thinking on how the dependencies that pack uses mix with the dependencies of a project. Even if pack is behind an alias, a clojure -A:pack invocation in a project directory will pick up deps under :deps key, which might cause confusion at least (in the Slack discussion case, Jib debug logging was turned on). This can be avoided by having project dependencies behind an alias, and passing that alias to pack arguments, but not to clojure invocation, e.g.

clojure \
  -A:pack \ # <-- pick up pack
  -m mach.pack.alpha.jib \ # use pack command
  ...command args... \
  -A main  # <-- tell pack which project aliases to include

Also, it seems that clj.native-image does some work on excluding itself from the target classpath. I wonder if pack could do something like that.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SevereOverfl0wcommented, Oct 22, 2019

There’s a new feature where you can have :deps in an alias to override the project dependencies.

This should fix the issue.

0reactions
viesticommented, Oct 22, 2019

Best kind of fix, sorts it self out by waiting 😄 (well, have to update documentation though 😃).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to exclude package dependencies in a NuGet package
To exclude a package reference you have to add the private asset attribute as shown in the image below.
Read more >
Maven – Optional Dependencies and Dependency Exclusions
Exclusions are set on a specific dependency in your POM, and are targeted at a specific groupId and artifactId. When you build your...
Read more >
How to Exclude Gradle Dependencies - Tom Gregory
When you declare a dependency in your build script, Gradle automatically pulls any transitive dependencies (dependencies of that dependency) ...
Read more >
How can I exclude dependencies brought in from other sub ...
exclude for dependencies has a little bit another syntax, so try to do it providing the module name, which is equals to the...
Read more >
exclusion when dependency on other projects #66 - GitHub
I have this schema: lazy val C = project .dependsOn(A, B).settings( (projectID in A).value exclude("commons-logging", "commons-logging"), ( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found