From 1ad9d15e4e935f9ecef1bfce8e09c7288d9819bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?X=C3=B9d=C5=8Dng=20Y=C3=A1ng?= Date: Wed, 24 Apr 2024 18:58:40 -0400 Subject: [PATCH] Use new host constraints in `@platforms` Also updates to latest Stardoc version. Addresses the rules_dotnet part of https://github.com/bazelbuild/bazel/issues/21877. --- MODULE.bazel | 7 +- docs/csharp_binary.md | 60 ++- docs/csharp_library.md | 58 ++- docs/csharp_nunit_test.md | 2 - docs/csharp_test.md | 60 ++- docs/defs.md | 396 +++++++++--------- docs/fsharp_binary.md | 51 ++- docs/fsharp_library.md | 48 +-- docs/fsharp_nunit_test.md | 2 - docs/fsharp_test.md | 50 ++- dotnet/private/transitions/BUILD.bazel | 2 +- dotnet/private/transitions/tfm_transition.bzl | 2 +- 12 files changed, 359 insertions(+), 379 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index b5c42fb7..0b5d768d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -28,13 +28,14 @@ use_repo(runtime_packs_extension, "dotnet.runtime_packs") apphost_packs_extension = use_extension("//dotnet/private/sdk/apphost_packs:dotnet.apphost_packs_extension.bzl", "apphost_packs_extension") use_repo(apphost_packs_extension, "dotnet.apphost_packs") -bazel_dep(name = "bazel_skylib", version = "1.4.2") -bazel_dep(name = "platforms", version = "0.0.9") +bazel_dep(name = "bazel_skylib", version = "1.6.0") +bazel_dep(name = "platforms", version = "0.0.10") +bazel_dep(name = "stardoc", version = "0.6.2") # Dev dependencies bazel_dep(name = "rules_pkg", version = "0.10.1", dev_dependency = True) bazel_dep(name = "gazelle", version = "0.33.0", dev_dependency = True, repo_name = "bazel_gazelle") -bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.2", dev_dependency = True) +bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.6.0", dev_dependency = True) bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True) bazel_dep(name = "aspect_bazel_lib", version = "1.34.5", dev_dependency = True) diff --git a/docs/csharp_binary.md b/docs/csharp_binary.md index 7b54c59b..40780c65 100644 --- a/docs/csharp_binary.md +++ b/docs/csharp_binary.md @@ -1,18 +1,16 @@ - Rule for compiling C# binaries. - ## csharp_binary
-csharp_binary(name, additionalfiles, allow_unsafe_blocks, compile_data, compiler_options, data,
-              defines, deps, generate_documentation_file, include_host_model_dll,
-              internals_visible_to, keyfile, langversion, nowarn, nullable, out, project_sdk,
-              resources, roll_forward_behavior, run_analyzers, srcs, target_frameworks,
+csharp_binary(name, deps, srcs, data, resources, out, additionalfiles, allow_unsafe_blocks,
+              compile_data, compiler_options, defines, generate_documentation_file,
+              include_host_model_dll, internals_visible_to, keyfile, langversion, nowarn, nullable,
+              project_sdk, roll_forward_behavior, run_analyzers, target_frameworks,
               treat_warnings_as_errors, warning_level, warnings_as_errors, warnings_not_as_errors,
               winexe)
 
@@ -25,31 +23,31 @@ Compile a C# exe | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| additionalfiles | Extra files to configure analyzers. | List of labels | optional | [] | -| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | False | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| include_host_model_dll | Whether to include Microsoft.NET.HostModel from the toolchain. This is only required to build tha apphost shimmer. | Boolean | optional | False | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | ["CS1701", "CS1702"] | -| nullable | Enable nullable context, or nullable warnings. | String | optional | "disable" | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | "Major" | -| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | True | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| additionalfiles | Extra files to configure analyzers. | List of labels | optional | `[]` | +| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | `False` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| include_host_model_dll | Whether to include Microsoft.NET.HostModel from the toolchain. This is only required to build tha apphost shimmer. | Boolean | optional | `False` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `["CS1701", "CS1702"]` | +| nullable | Enable nullable context, or nullable warnings. | String | optional | `"disable"` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | +| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | `"Major"` | +| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | `True` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | False | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | `False` | diff --git a/docs/csharp_library.md b/docs/csharp_library.md index 782f885a..3a970727 100644 --- a/docs/csharp_library.md +++ b/docs/csharp_library.md @@ -1,19 +1,17 @@ - Rule for compiling C# libraries. - ## csharp_library
-csharp_library(name, additionalfiles, allow_unsafe_blocks, compile_data, compiler_options, data,
-               defines, deps, exports, generate_documentation_file, internals_visible_to, keyfile,
-               langversion, nowarn, nullable, out, project_sdk, resources, run_analyzers, srcs,
-               target_frameworks, treat_warnings_as_errors, warning_level, warnings_as_errors,
-               warnings_not_as_errors)
+csharp_library(name, deps, srcs, data, resources, out, additionalfiles, allow_unsafe_blocks,
+               compile_data, compiler_options, defines, exports, generate_documentation_file,
+               internals_visible_to, keyfile, langversion, nowarn, nullable, project_sdk,
+               run_analyzers, target_frameworks, treat_warnings_as_errors, warning_level,
+               warnings_as_errors, warnings_not_as_errors)
 
Compile a C# DLL @@ -24,29 +22,29 @@ Compile a C# DLL | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| additionalfiles | Extra files to configure analyzers. | List of labels | optional | [] | -| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | False | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| exports | List of targets to add to the dependencies of those that depend on this target. Use this sparingly as it weakens the precision of the build graph.

This attribute does nothing if you don't have strict dependencies enabled. | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | ["CS1701", "CS1702"] | -| nullable | Enable nullable context, or nullable warnings. | String | optional | "disable" | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | True | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| additionalfiles | Extra files to configure analyzers. | List of labels | optional | `[]` | +| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | `False` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| exports | List of targets to add to the dependencies of those that depend on this target. Use this sparingly as it weakens the precision of the build graph.

This attribute does nothing if you don't have strict dependencies enabled. | List of labels | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `["CS1701", "CS1702"]` | +| nullable | Enable nullable context, or nullable warnings. | String | optional | `"disable"` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | +| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | `True` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | diff --git a/docs/csharp_nunit_test.md b/docs/csharp_nunit_test.md index cf54e2e4..c8f269a2 100644 --- a/docs/csharp_nunit_test.md +++ b/docs/csharp_nunit_test.md @@ -1,11 +1,9 @@ - Rules for compiling and running NUnit tests. This rule is a macro that has the same attributes as `csharp_test` - ## csharp_nunit_test diff --git a/docs/csharp_test.md b/docs/csharp_test.md index 5a0c1e22..5d3a7487 100644 --- a/docs/csharp_test.md +++ b/docs/csharp_test.md @@ -1,22 +1,20 @@ - Rule for compiling and running test binaries. This rule can be used to compile and run any C# binary and run it as a Bazel test. - ## csharp_test
-csharp_test(name, additionalfiles, allow_unsafe_blocks, compile_data, compiler_options, data,
-            defines, deps, generate_documentation_file, internals_visible_to, keyfile, langversion,
-            nowarn, nullable, out, project_sdk, resources, roll_forward_behavior, run_analyzers, srcs,
-            target_frameworks, treat_warnings_as_errors, warning_level, warnings_as_errors,
-            warnings_not_as_errors, winexe)
+csharp_test(name, deps, srcs, data, resources, out, additionalfiles, allow_unsafe_blocks,
+            compile_data, compiler_options, defines, generate_documentation_file,
+            internals_visible_to, keyfile, langversion, nowarn, nullable, project_sdk,
+            roll_forward_behavior, run_analyzers, target_frameworks, treat_warnings_as_errors,
+            warning_level, warnings_as_errors, warnings_not_as_errors, winexe)
 
Compiles a C# executable and runs it as a test @@ -27,30 +25,30 @@ Compiles a C# executable and runs it as a test | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| additionalfiles | Extra files to configure analyzers. | List of labels | optional | [] | -| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | False | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | ["CS1701", "CS1702"] | -| nullable | Enable nullable context, or nullable warnings. | String | optional | "disable" | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | "Major" | -| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | True | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| additionalfiles | Extra files to configure analyzers. | List of labels | optional | `[]` | +| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | `False` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `["CS1701", "CS1702"]` | +| nullable | Enable nullable context, or nullable warnings. | String | optional | `"disable"` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | +| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | `"Major"` | +| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | `True` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | False | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | `False` | diff --git a/docs/defs.md b/docs/defs.md index 8be2592c..51e36fe6 100644 --- a/docs/defs.md +++ b/docs/defs.md @@ -4,16 +4,15 @@ Public API surface is re-exported here. Users should not load files under "/dotnet" - ## csharp_binary
-csharp_binary(name, additionalfiles, allow_unsafe_blocks, compile_data, compiler_options, data,
-              defines, deps, generate_documentation_file, include_host_model_dll,
-              internals_visible_to, keyfile, langversion, nowarn, nullable, out, project_sdk,
-              resources, roll_forward_behavior, run_analyzers, srcs, target_frameworks,
+csharp_binary(name, deps, srcs, data, resources, out, additionalfiles, allow_unsafe_blocks,
+              compile_data, compiler_options, defines, generate_documentation_file,
+              include_host_model_dll, internals_visible_to, keyfile, langversion, nowarn, nullable,
+              project_sdk, roll_forward_behavior, run_analyzers, target_frameworks,
               treat_warnings_as_errors, warning_level, warnings_as_errors, warnings_not_as_errors,
               winexe)
 
@@ -26,32 +25,32 @@ Compile a C# exe | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| additionalfiles | Extra files to configure analyzers. | List of labels | optional | [] | -| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | False | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| include_host_model_dll | Whether to include Microsoft.NET.HostModel from the toolchain. This is only required to build tha apphost shimmer. | Boolean | optional | False | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | ["CS1701", "CS1702"] | -| nullable | Enable nullable context, or nullable warnings. | String | optional | "disable" | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | "Major" | -| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | True | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| additionalfiles | Extra files to configure analyzers. | List of labels | optional | `[]` | +| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | `False` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| include_host_model_dll | Whether to include Microsoft.NET.HostModel from the toolchain. This is only required to build tha apphost shimmer. | Boolean | optional | `False` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `["CS1701", "CS1702"]` | +| nullable | Enable nullable context, or nullable warnings. | String | optional | `"disable"` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | +| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | `"Major"` | +| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | `True` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | False | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | `False` | @@ -59,11 +58,11 @@ Compile a C# exe ## csharp_library
-csharp_library(name, additionalfiles, allow_unsafe_blocks, compile_data, compiler_options, data,
-               defines, deps, exports, generate_documentation_file, internals_visible_to, keyfile,
-               langversion, nowarn, nullable, out, project_sdk, resources, run_analyzers, srcs,
-               target_frameworks, treat_warnings_as_errors, warning_level, warnings_as_errors,
-               warnings_not_as_errors)
+csharp_library(name, deps, srcs, data, resources, out, additionalfiles, allow_unsafe_blocks,
+               compile_data, compiler_options, defines, exports, generate_documentation_file,
+               internals_visible_to, keyfile, langversion, nowarn, nullable, project_sdk,
+               run_analyzers, target_frameworks, treat_warnings_as_errors, warning_level,
+               warnings_as_errors, warnings_not_as_errors)
 
Compile a C# DLL @@ -74,30 +73,30 @@ Compile a C# DLL | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| additionalfiles | Extra files to configure analyzers. | List of labels | optional | [] | -| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | False | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| exports | List of targets to add to the dependencies of those that depend on this target. Use this sparingly as it weakens the precision of the build graph.

This attribute does nothing if you don't have strict dependencies enabled. | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | ["CS1701", "CS1702"] | -| nullable | Enable nullable context, or nullable warnings. | String | optional | "disable" | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | True | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| additionalfiles | Extra files to configure analyzers. | List of labels | optional | `[]` | +| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | `False` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| exports | List of targets to add to the dependencies of those that depend on this target. Use this sparingly as it weakens the precision of the build graph.

This attribute does nothing if you don't have strict dependencies enabled. | List of labels | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `["CS1701", "CS1702"]` | +| nullable | Enable nullable context, or nullable warnings. | String | optional | `"disable"` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | +| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | `True` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | @@ -105,11 +104,11 @@ Compile a C# DLL ## csharp_test
-csharp_test(name, additionalfiles, allow_unsafe_blocks, compile_data, compiler_options, data,
-            defines, deps, generate_documentation_file, internals_visible_to, keyfile, langversion,
-            nowarn, nullable, out, project_sdk, resources, roll_forward_behavior, run_analyzers, srcs,
-            target_frameworks, treat_warnings_as_errors, warning_level, warnings_as_errors,
-            warnings_not_as_errors, winexe)
+csharp_test(name, deps, srcs, data, resources, out, additionalfiles, allow_unsafe_blocks,
+            compile_data, compiler_options, defines, generate_documentation_file,
+            internals_visible_to, keyfile, langversion, nowarn, nullable, project_sdk,
+            roll_forward_behavior, run_analyzers, target_frameworks, treat_warnings_as_errors,
+            warning_level, warnings_as_errors, warnings_not_as_errors, winexe)
 
Compiles a C# executable and runs it as a test @@ -120,31 +119,31 @@ Compiles a C# executable and runs it as a test | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| additionalfiles | Extra files to configure analyzers. | List of labels | optional | [] | -| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | False | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | ["CS1701", "CS1702"] | -| nullable | Enable nullable context, or nullable warnings. | String | optional | "disable" | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | "Major" | -| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | True | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| additionalfiles | Extra files to configure analyzers. | List of labels | optional | `[]` | +| allow_unsafe_blocks | Allow compiling unsafe code. It true, /unsafe is passed to the compiler. | Boolean | optional | `False` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `["CS1701", "CS1702"]` | +| nullable | Enable nullable context, or nullable warnings. | String | optional | `"disable"` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | +| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | `"Major"` | +| run_analyzers | Controls whether analyzers run at build time. | Boolean | optional | `True` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | False | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | `False` | @@ -152,11 +151,10 @@ Compiles a C# executable and runs it as a test ## fsharp_binary
-fsharp_binary(name, compile_data, compiler_options, data, defines, deps,
-              generate_documentation_file, internals_visible_to, keyfile, langversion, nowarn, out,
-              project_sdk, resources, roll_forward_behavior, srcs, target_frameworks,
-              treat_warnings_as_errors, warning_level, warnings_as_errors, warnings_not_as_errors,
-              winexe)
+fsharp_binary(name, deps, srcs, data, resources, out, compile_data, compiler_options, defines,
+              generate_documentation_file, internals_visible_to, keyfile, langversion, nowarn,
+              project_sdk, roll_forward_behavior, target_frameworks, treat_warnings_as_errors,
+              warning_level, warnings_as_errors, warnings_not_as_errors, winexe)
 
Compile a F# exe @@ -167,27 +165,27 @@ Compile a F# exe | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | [] | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | "Major" | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `[]` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | +| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | `"Major"` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | False | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | `False` | @@ -195,10 +193,10 @@ Compile a F# exe ## fsharp_library
-fsharp_library(name, compile_data, compiler_options, data, defines, deps, exports,
-               generate_documentation_file, internals_visible_to, keyfile, langversion, nowarn, out,
-               project_sdk, resources, srcs, target_frameworks, treat_warnings_as_errors,
-               warning_level, warnings_as_errors, warnings_not_as_errors)
+fsharp_library(name, deps, srcs, data, resources, out, compile_data, compiler_options, defines,
+               exports, generate_documentation_file, internals_visible_to, keyfile, langversion,
+               nowarn, project_sdk, target_frameworks, treat_warnings_as_errors, warning_level,
+               warnings_as_errors, warnings_not_as_errors)
 
Compile a F# DLL @@ -209,26 +207,26 @@ Compile a F# DLL | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| exports | List of targets to add to the dependencies of those that depend on this target. Use this sparingly as it weakens the precision of the build graph.

This attribute does nothing if you don't have strict dependencies enabled. | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | [] | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| exports | List of targets to add to the dependencies of those that depend on this target. Use this sparingly as it weakens the precision of the build graph.

This attribute does nothing if you don't have strict dependencies enabled. | List of labels | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `[]` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | @@ -236,10 +234,10 @@ Compile a F# DLL ## fsharp_test
-fsharp_test(name, compile_data, compiler_options, data, defines, deps, generate_documentation_file,
-            internals_visible_to, keyfile, langversion, nowarn, out, project_sdk, resources,
-            roll_forward_behavior, srcs, target_frameworks, treat_warnings_as_errors, warning_level,
-            warnings_as_errors, warnings_not_as_errors, winexe)
+fsharp_test(name, deps, srcs, data, resources, out, compile_data, compiler_options, defines,
+            generate_documentation_file, internals_visible_to, keyfile, langversion, nowarn,
+            project_sdk, roll_forward_behavior, target_frameworks, treat_warnings_as_errors,
+            warning_level, warnings_as_errors, warnings_not_as_errors, winexe)
 
Compile a F# executable and runs it as a test @@ -250,27 +248,27 @@ Compile a F# executable and runs it as a test | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | [] | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | "Major" | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `[]` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | +| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | `"Major"` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | False | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | `False` | @@ -289,9 +287,9 @@ Imports a DLL | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| data | Other files that this DLL depends on at runtime | List of labels | optional | [] | +| data | Other files that this DLL depends on at runtime | List of labels | optional | `[]` | | dll | The name of the library | Label | required | | -| version | The version of the library | String | optional | "" | +| version | The version of the library | String | optional | `""` | @@ -299,7 +297,7 @@ Imports a DLL ## import_library
-import_library(name, analyzers, data, deps, framework_list, library_name, libs, native, nupkg, refs,
+import_library(name, deps, data, analyzers, framework_list, library_name, libs, native, nupkg, refs,
                sha512, targeting_pack_overrides, version)
 
@@ -311,42 +309,18 @@ Creates a target for a static DLL for a specific target framework | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| analyzers | Static analyzer DLLs | List of labels | optional | [] | -| data | Other files that this DLL depends on at runtime | List of labels | optional | [] | -| deps | Other DLLs that this DLL depends on. | List of labels | optional | [] | -| framework_list | Targeting packs like e.g. Microsoft.NETCore.App.Ref have a PlatformManifest.txt that includes all the DLLs that are included in the targeting pack. This is used to determine which version of a DLL should be used during compilation or runtime. | Dictionary: String -> String | optional | {} | +| deps | Other DLLs that this DLL depends on. | List of labels | optional | `[]` | +| data | Other files that this DLL depends on at runtime | List of labels | optional | `[]` | +| analyzers | Static analyzer DLLs | List of labels | optional | `[]` | +| framework_list | Targeting packs like e.g. Microsoft.NETCore.App.Ref have a PlatformManifest.txt that includes all the DLLs that are included in the targeting pack. This is used to determine which version of a DLL should be used during compilation or runtime. | Dictionary: String -> String | optional | `{}` | | library_name | The name of the library | String | required | | -| libs | Static runtime DLLs | List of labels | optional | [] | -| native | Native runtime DLLs | List of labels | optional | [] | -| nupkg | The .nupkg file providing this import | Label | optional | None | -| refs | Compile time DLLs | List of labels | optional | [] | -| sha512 | The SHA512 sum of the NuGet package | String | optional | "" | -| targeting_pack_overrides | Targeting packs like e.g. Microsoft.NETCore.App.Ref have a PackageOverride.txt that includes a list of NuGet packages that should be omitted in a compiliation because they are included in the targeting pack | Dictionary: String -> String | optional | {} | -| version | The version of the library | String | optional | "" | - - - - -## nuget_archive - -
-nuget_archive(name, id, netrc, repo_mapping, sha512, sources, version)
-
- - - -**ATTRIBUTES** - - -| Name | Description | Type | Mandatory | Default | -| :------------- | :------------- | :------------- | :------------- | :------------- | -| name | A unique name for this repository. | Name | required | | -| id | - | String | optional | "" | -| netrc | - | Label | optional | None | -| repo_mapping | A dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.<p>For example, an entry "@foo": "@bar" declares that, for any time this repository depends on @foo (such as a dependency on @foo//some:target, it should actually resolve that dependency within globally-declared @bar (@bar//some:target). | Dictionary: String -> String | required | | -| sha512 | - | String | optional | "" | -| sources | - | List of strings | optional | [] | -| version | - | String | optional | "" | +| libs | Static runtime DLLs | List of labels | optional | `[]` | +| native | Native runtime DLLs | List of labels | optional | `[]` | +| nupkg | The `.nupkg` file providing this import | Label | optional | `None` | +| refs | Compile time DLLs | List of labels | optional | `[]` | +| sha512 | The SHA512 sum of the NuGet package | String | optional | `""` | +| targeting_pack_overrides | Targeting packs like e.g. Microsoft.NETCore.App.Ref have a PackageOverride.txt that includes a list of NuGet packages that should be omitted in a compiliation because they are included in the targeting pack | Dictionary: String -> String | optional | `{}` | +| version | The version of the library | String | optional | `""` | @@ -367,9 +341,9 @@ Publish a .Net binary | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | binary | The .Net binary that is being published | Label | required | | -| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | "Minor" | -| runtime_identifier | The runtime identifier that is being targeted. See https://docs.microsoft.com/en-us/dotnet/core/rid-catalog | String | optional | "" | -| self_contained | Whether the binary should be self-contained.

If true, the binary will be published as a self-contained but you need to provide a runtime pack in the runtime_packs attribute. At some point the rules might resolve the runtime pack automatically.

If false, the binary will be published as a non-self-contained. That means that to be able to run the binary you need to have a .Net runtime installed on the host system. | Boolean | optional | False | +| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | `"Minor"` | +| runtime_identifier | The runtime identifier that is being targeted. See https://docs.microsoft.com/en-us/dotnet/core/rid-catalog | String | optional | `""` | +| self_contained | Whether the binary should be self-contained.

If true, the binary will be published as a self-contained but you need to provide a runtime pack in the `runtime_packs` attribute. At some point the rules might resolve the runtime pack automatically.

If false, the binary will be published as a non-self-contained. That means that to be able to run the binary you need to have a .Net runtime installed on the host system. | Boolean | optional | `False` | | target_framework | The target framework that should be published | String | required | | @@ -428,3 +402,25 @@ nuget_repo(name, p | packages |

-

| none | + + +## nuget_archive + +
+nuget_archive(name, id, netrc, repo_mapping, sha512, sources, version)
+
+ +**ATTRIBUTES** + + +| Name | Description | Type | Mandatory | Default | +| :------------- | :------------- | :------------- | :------------- | :------------- | +| name | A unique name for this repository. | Name | required | | +| id | - | String | optional | `""` | +| netrc | - | Label | optional | `None` | +| repo_mapping | In `WORKSPACE` context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.

For example, an entry `"@foo": "@bar"` declares that, for any time this repository depends on `@foo` (such as a dependency on `@foo//some:target`, it should actually resolve that dependency within globally-declared `@bar` (`@bar//some:target`).

This attribute is _not_ supported in `MODULE.bazel` context (when invoking a repository rule inside a module extension's implementation function). | Dictionary: String -> String | optional | | +| sha512 | - | String | optional | `""` | +| sources | - | List of strings | optional | `[]` | +| version | - | String | optional | `""` | + + diff --git a/docs/fsharp_binary.md b/docs/fsharp_binary.md index 03f00df5..90fb5acd 100644 --- a/docs/fsharp_binary.md +++ b/docs/fsharp_binary.md @@ -1,19 +1,16 @@ - Rule for compiling F# binaries. - ## fsharp_binary
-fsharp_binary(name, compile_data, compiler_options, data, defines, deps,
-              generate_documentation_file, internals_visible_to, keyfile, langversion, nowarn, out,
-              project_sdk, resources, roll_forward_behavior, srcs, target_frameworks,
-              treat_warnings_as_errors, warning_level, warnings_as_errors, warnings_not_as_errors,
-              winexe)
+fsharp_binary(name, deps, srcs, data, resources, out, compile_data, compiler_options, defines,
+              generate_documentation_file, internals_visible_to, keyfile, langversion, nowarn,
+              project_sdk, roll_forward_behavior, target_frameworks, treat_warnings_as_errors,
+              warning_level, warnings_as_errors, warnings_not_as_errors, winexe)
 
Compile a F# exe @@ -24,26 +21,26 @@ Compile a F# exe | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | [] | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | "Major" | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `[]` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | +| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | `"Major"` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | False | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | `False` | diff --git a/docs/fsharp_library.md b/docs/fsharp_library.md index f6a804c3..161a2ebc 100644 --- a/docs/fsharp_library.md +++ b/docs/fsharp_library.md @@ -1,18 +1,16 @@ - Rule for compiling F# libraries. - ## fsharp_library
-fsharp_library(name, compile_data, compiler_options, data, defines, deps, exports,
-               generate_documentation_file, internals_visible_to, keyfile, langversion, nowarn, out,
-               project_sdk, resources, srcs, target_frameworks, treat_warnings_as_errors,
-               warning_level, warnings_as_errors, warnings_not_as_errors)
+fsharp_library(name, deps, srcs, data, resources, out, compile_data, compiler_options, defines,
+               exports, generate_documentation_file, internals_visible_to, keyfile, langversion,
+               nowarn, project_sdk, target_frameworks, treat_warnings_as_errors, warning_level,
+               warnings_as_errors, warnings_not_as_errors)
 
Compile a F# DLL @@ -23,25 +21,25 @@ Compile a F# DLL | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| exports | List of targets to add to the dependencies of those that depend on this target. Use this sparingly as it weakens the precision of the build graph.

This attribute does nothing if you don't have strict dependencies enabled. | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | [] | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| exports | List of targets to add to the dependencies of those that depend on this target. Use this sparingly as it weakens the precision of the build graph.

This attribute does nothing if you don't have strict dependencies enabled. | List of labels | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `[]` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | diff --git a/docs/fsharp_nunit_test.md b/docs/fsharp_nunit_test.md index e0725899..4461047b 100644 --- a/docs/fsharp_nunit_test.md +++ b/docs/fsharp_nunit_test.md @@ -1,11 +1,9 @@ - Rules for compiling and running NUnit tests. This rule is a macro that has the same attributes as `fsharp_test` - ## fsharp_nunit_test diff --git a/docs/fsharp_test.md b/docs/fsharp_test.md index 8b0f1fb8..6b1cdc41 100644 --- a/docs/fsharp_test.md +++ b/docs/fsharp_test.md @@ -1,21 +1,19 @@ - Rule for compiling and running test binaries. This rule can be used to compile and run any F# binary and run it as a Bazel test. - ## fsharp_test
-fsharp_test(name, compile_data, compiler_options, data, defines, deps, generate_documentation_file,
-            internals_visible_to, keyfile, langversion, nowarn, out, project_sdk, resources,
-            roll_forward_behavior, srcs, target_frameworks, treat_warnings_as_errors, warning_level,
-            warnings_as_errors, warnings_not_as_errors, winexe)
+fsharp_test(name, deps, srcs, data, resources, out, compile_data, compiler_options, defines,
+            generate_documentation_file, internals_visible_to, keyfile, langversion, nowarn,
+            project_sdk, roll_forward_behavior, target_frameworks, treat_warnings_as_errors,
+            warning_level, warnings_as_errors, warnings_not_as_errors, winexe)
 
Compile a F# executable and runs it as a test @@ -26,26 +24,26 @@ Compile a F# executable and runs it as a test | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | -| compile_data | Additional compile time files. | List of labels | optional | [] | -| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | [] | -| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | [] | -| defines | A list of preprocessor directive symbols to define. | List of strings | optional | [] | -| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | [] | -| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | True | -| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | [] | -| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | None | -| langversion | The version string for the language. | String | optional | "" | -| nowarn | List of warnings that should be ignored | List of strings | optional | [] | -| out | File name, without extension, of the built assembly. | String | optional | "" | -| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | "default" | -| resources | A list of files to embed in the DLL as resources. | List of labels | optional | [] | -| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | "Major" | -| srcs | The source files used in the compilation. | List of labels | optional | [] | +| deps | Other libraries, binaries, or imported DLLs | List of labels | optional | `[]` | +| srcs | The source files used in the compilation. | List of labels | optional | `[]` | +| data | Runtime files. It is recommended to use the @rules_dotnet//tools/runfiles library to read the runtime files. | List of labels | optional | `[]` | +| resources | A list of files to embed in the DLL as resources. | List of labels | optional | `[]` | +| out | File name, without extension, of the built assembly. | String | optional | `""` | +| compile_data | Additional compile time files. | List of labels | optional | `[]` | +| compiler_options | Additional options to pass to the compiler. This attribute should only be used if the compiler flag has not already been exposed as an attribute. | List of strings | optional | `[]` | +| defines | A list of preprocessor directive symbols to define. | List of strings | optional | `[]` | +| generate_documentation_file | Whether or not to generate a documentation file. | Boolean | optional | `True` | +| internals_visible_to | Other libraries that can see the assembly's internal symbols. Using this rather than the InternalsVisibleTo assembly attribute will improve build caching. | List of strings | optional | `[]` | +| keyfile | The key file used to sign the assembly with a strong name. | Label | optional | `None` | +| langversion | The version string for the language. | String | optional | `""` | +| nowarn | List of warnings that should be ignored | List of strings | optional | `[]` | +| project_sdk | The project SDK that is being targeted. See https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview | String | optional | `"default"` | +| roll_forward_behavior | The roll forward behavior that should be used: https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior | String | optional | `"Major"` | | target_frameworks | A list of target framework monikers to buildSee https://docs.microsoft.com/en-us/dotnet/standard/frameworks | List of strings | required | | -| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | False | -| warning_level | The warning level that should be used by the compiler. | Integer | optional | 3 | -| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | [] | -| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | False | +| treat_warnings_as_errors | Treat all compiler warnings as errors. Note that this attribute can not be used in conjunction with warnings_as_errors. | Boolean | optional | `False` | +| warning_level | The warning level that should be used by the compiler. | Integer | optional | `3` | +| warnings_as_errors | List of compiler warning codes that should be considered as errors. Note that this attribute can not be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| warnings_not_as_errors | List of compiler warning codes that should not be considered as errors. Note that this attribute can only be used in conjunction with treat_warning_as_errors. | List of strings | optional | `[]` | +| winexe | If true, output a winexe-style executable, otherwiseoutput a console-style executable. | Boolean | optional | `False` | diff --git a/dotnet/private/transitions/BUILD.bazel b/dotnet/private/transitions/BUILD.bazel index a84575a3..096c99fa 100644 --- a/dotnet/private/transitions/BUILD.bazel +++ b/dotnet/private/transitions/BUILD.bazel @@ -18,7 +18,7 @@ bzl_library( ":common", "//dotnet/private:common", "@bazel_skylib//lib:dicts", - "@local_config_platform//:constraints.bzl", + "@platforms//host:constraints_lib", ], ) diff --git a/dotnet/private/transitions/tfm_transition.bzl b/dotnet/private/transitions/tfm_transition.bzl index d8f7cf69..48aeffd1 100644 --- a/dotnet/private/transitions/tfm_transition.bzl +++ b/dotnet/private/transitions/tfm_transition.bzl @@ -1,7 +1,7 @@ "A transition that transitions between compatible target frameworks" load("@bazel_skylib//lib:dicts.bzl", "dicts") -load("@local_config_platform//:constraints.bzl", "HOST_CONSTRAINTS") +load("@platforms//host:constraints.bzl", "HOST_CONSTRAINTS") load( "//dotnet/private:common.bzl", "FRAMEWORK_COMPATIBILITY",