bazel-contrib / bazel-contrib/rules_dotnet
[Next] Expose F# source files as a provider?
- Dominant language
- Starlark
- Stars
- 209
- Forks
- 98
- Avg merge
- 3h 59m
- Merged PRs (30d)
- 14
Description
I have been investigating the feasibility of [Fable](https://fable.io/) rules (https://github.com/bazelbuild/rules_dotnet/issues/236) that can consume `fsharp_library` targets as `deps`.
The motivation for this is that the user will not have to define their library targets twice to support .NET and Fable.
```starlark
load("@rules_dotnet//dotnet:defs.bzl", "fsharp_library")
load("@rules_fable//fable:defs.bzl", "fable_library")
fsharp_library(
name = "lib",
srcs = [
"Library.fs",
],
target_frameworks = [ "netstandard2.1" ],
deps = [
"@paket.main//netstandard.library.ref",
"@paket.main//fsharp.core",
],
)
fable_library(
name = "app",
srcs = [
"App.fs",
],
deps = [
":lib",
],
)
```
Fable requires the source-files (`.fs`, `.fsi`) of all dependencies to compile. However, this information does not appear to be exposed by any provider on `fsharp_library`.
Is it possible to get the sources-files of and `fsharp_library`?
If not, could this provider be added? Perhaps `FSharpInfo`?
Contributor guide
Research direction
Start by locating the fsharp_library rule and its existing provider definitions, then check how its source files are represented for dependencies. Compare the needs in the Fable example with the current rule interface. Done means a dependent Fable rule can obtain the .fs and .fsi sources from fsharp_library, with coverage for the provider behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100