mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-09-17 10:17:09 +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 = [
|
ElmToolchainInfo = provider(fields = [
|
||||||
"elm",
|
"elm",
|
||||||
"isolated_compile",
|
"isolated_compile",
|
||||||
|
"elm_format",
|
||||||
])
|
])
|
||||||
|
|
||||||
def _system_elm_toolchain_impl(ctx) -> [[DefaultInfo.type, ElmToolchainInfo.type]]:
|
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(),
|
DefaultInfo(),
|
||||||
ElmToolchainInfo(
|
ElmToolchainInfo(
|
||||||
elm = RunInfo(args = ["elm"]),
|
elm = RunInfo(args = ["elm"]),
|
||||||
|
elm_format = RunInfo(args = ["elm-format"]),
|
||||||
isolated_compile = ctx.attrs._isolated_compile,
|
isolated_compile = ctx.attrs._isolated_compile,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@ -33,6 +35,7 @@ def _elm_toolchain_impl(ctx: "context") -> [[DefaultInfo.type, ElmToolchainInfo.
|
|||||||
DefaultInfo(),
|
DefaultInfo(),
|
||||||
ElmToolchainInfo(
|
ElmToolchainInfo(
|
||||||
elm = ctx.attrs.elm[RunInfo],
|
elm = ctx.attrs.elm[RunInfo],
|
||||||
|
elm_format = ctx.attrs.elm_format[RunInfo],
|
||||||
isolated_compile = ctx.attrs._isolated_compile,
|
isolated_compile = ctx.attrs._isolated_compile,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@ -44,6 +47,10 @@ elm_toolchain = rule(
|
|||||||
providers = [RunInfo],
|
providers = [RunInfo],
|
||||||
default = "prelude-nri//elm:elm_compiler_binary",
|
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"),
|
"_isolated_compile": attrs.dep(default = "prelude-nri//elm:isolated_compile.py"),
|
||||||
},
|
},
|
||||||
is_toolchain_rule = True,
|
is_toolchain_rule = True,
|
||||||
|
Loading…
Reference in New Issue
Block a user