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
artifacts.bzl` declares what dependencies are allowed in a given repository and has allowed us to manage dependencies and versioning effectively.
Some dependencies declared there are only used in building and testing (eg., JUnit, Github library, Checkstyle, etc) whereas some others are used in production (ie., actually included in the distribution).
We should split the declaration in artifacts.bzl accordingly
production dependencies (for dependencies used in the distribution)
build dependencies (for dependencies used in build and test)
With this split, a library declared in production can be included in the distribution whereas a library declared in build cannot, and should only be used in assembly, deployment, or tests.
The workspace name for each dependencies should also clearly indicate whether they are production or a build dependency:
We should also create a way to verify that there are no build dependency that is used in production:
bazel run //:dependency-test
ERROR: target //server:server depends on a build dependency '@build//junit_junit'
Being able to separate production and build dependencies will help us manage the dependency better - we can be strict in allowing what goes in production, while being more lenient for dependencies in build.
The text was updated successfully, but these errors were encountered:
lolski
changed the title
Group Maven artifacts into production and build
Group Maven dependencies: production dependencies and build / test dependencies
Nov 27, 2020
Copying over the content of a duplicate issue from #244
Description
We need to improve our Maven dependency snapshot by categorising them into three categories:
artifacts-distribution.snapshot: the dependencies that get included in the distribution. For example, for Grakn Core it would be the zip and tar distribution and for Client Java the Maven JAR.
artifacts-test.snapshot: dependencies that are used in tests (eg., JUnit, GraknCoreRunner, Cucumber), minus the dependencies in artifacts-distribution.snapshot. (ps: Could this be sufficiently implemented by querying for all dependencies of java_test targets??)
artifacts-build.snapshot: the rest of the dependencies, that are not in artifact-distribution.snapshot or artifact-test.snapshot.
They should be generated in the same way as the old one, eg., when the user invokes update.sh:
artifacts.bzl` declares what dependencies are allowed in a given repository and has allowed us to manage dependencies and versioning effectively.
Some dependencies declared there are only used in building and testing (eg., JUnit, Github library, Checkstyle, etc) whereas some others are used in production (ie., actually included in the distribution).
We should split the declaration in
artifacts.bzl
accordinglyproduction
dependencies (for dependencies used in the distribution)build
dependencies (for dependencies used in build and test)With this split, a library declared in
production
can be included in the distribution whereas a library declared inbuild
cannot, and should only be used in assembly, deployment, or tests.The workspace name for each dependencies should also clearly indicate whether they are production or a build dependency:
We should also create a way to verify that there are no build dependency that is used in production:
Being able to separate production and build dependencies will help us manage the dependency better - we can be strict in allowing what goes in production, while being more lenient for dependencies in build.
The text was updated successfully, but these errors were encountered: