mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-09-11 07:05:38 +03:00
add elm-format info to the toolchain
This commit is contained in:
parent
ddcc38630f
commit
b8a1d3163d
@ -1,6 +1,7 @@
|
||||
ElmToolchainInfo = provider(fields = [
|
||||
"elm",
|
||||
"isolated_compile",
|
||||
"elm_format",
|
||||
])
|
||||
|
||||
def _system_elm_toolchain_impl(ctx) -> [[DefaultInfo.type, ElmToolchainInfo.type]]:
|
||||
@ -12,6 +13,7 @@ def _system_elm_toolchain_impl(ctx) -> [[DefaultInfo.type, ElmToolchainInfo.type
|
||||
DefaultInfo(),
|
||||
ElmToolchainInfo(
|
||||
elm = RunInfo(args = ["elm"]),
|
||||
elm_format = RunInfo(args = ["elm-format"]),
|
||||
isolated_compile = ctx.attrs._isolated_compile,
|
||||
),
|
||||
]
|
||||
@ -33,6 +35,7 @@ def _elm_toolchain_impl(ctx: "context") -> [[DefaultInfo.type, ElmToolchainInfo.
|
||||
DefaultInfo(),
|
||||
ElmToolchainInfo(
|
||||
elm = ctx.attrs.elm[RunInfo],
|
||||
elm_format = ctx.attrs.elm_format[RunInfo],
|
||||
isolated_compile = ctx.attrs._isolated_compile,
|
||||
),
|
||||
]
|
||||
@ -44,6 +47,10 @@ elm_toolchain = rule(
|
||||
providers = [RunInfo],
|
||||
default = "prelude-nri//elm:elm_compiler_binary",
|
||||
),
|
||||
"elm_format": attrs.dep(
|
||||
providers = [RunInfo],
|
||||
default = "prelude-nri//elm:elm_format_binary",
|
||||
),
|
||||
"_isolated_compile": attrs.dep(default = "prelude-nri//elm:isolated_compile.py"),
|
||||
},
|
||||
is_toolchain_rule = True,
|
||||
|
Loading…
Reference in New Issue
Block a user