bazel-contrib / bazel-contrib/rules_scala

build a rule to generate the intra-target source deps

Open
#8 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
384
Forks
292
Avg merge
3d 3m
Merged PRs (30d)
42

Description

Zinc:
https://github.com/typesafehub/zinc

could analyze sources and output the dependency graph of the files in a target. This could be helpful to output a set of targets that are smaller so the bazel's built in incrementalism is more effective.

so, you could have something like this:

```
scala_file_dependencies(name = "foo", target = "mylibrary")
```

and this could generate a new `BUILD` as output that has each file as a target with the correct dependencies.

This seems suboptimal for usability, but given bazel's model of compilation as a pure function from source to output artifact, this might part of a practical solution for making faster builds.

Contributor guide

Open the contributing guide

Research direction

Start by investigating Zinc's source-analysis capabilities and how the proposed scala_file_dependencies rule would fit Bazel's target model. Define the input target, dependency graph, and generated BUILD output before attempting implementation; done would mean a working rule that produces per-file targets with correct intra-target dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.