bazel-contrib / bazel-contrib/rules_dotnet
Cannot run paket2bazel
- Dominant language
- Starlark
- Stars
- 209
- Forks
- 98
- Avg merge
- 3h 59m
- Merged PRs (30d)
- 14
Description
Running this:
```bash
bazel run @rules_dotnet//tools/paket2bazel
```
Gives:
```
INFO: Analyzed target @@rules_dotnet~//tools/paket2bazel:paket2bazel (236 packages loaded, 7860 targets configured).
ERROR: /home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/external/rules_dotnet~/dotnet/private/sdk/gen/BUILD.bazel:3:14: Compiling gen failed: (Exit 1): compiler_wrapper.sh failed: error executing FSharpCompile command (from target @@rules_dotnet~//dotnet/private/sdk/gen:gen) external/rules_dotnet~/dotnet/private/compiler_wrapper.sh external/rules_dotnet~~dotnet~dotnet_x86_64-unknown-linux-gnu/dotnet ... (remaining 2 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error FS1225: File '/home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/sandbox/processwrapper-sandbox/3/execroot/_main/external/rules_dotnet~~paket2bazel_dependencies_extension~nuget.fsharp.core.v9.0.100/lib/netstandard2.1/FSharp.Core.optdata' not found alongside FSharp.Core. File expected in /home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/sandbox/processwrapper-sandbox/3/execroot/_main/external/rules_dotnet~~paket2bazel_dependencies_extension~nuget.fsharp.core.v9.0.100/lib/netstandard2.1/FSharp.Core.optdata. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required.
error FS0229: Error opening binary file '/home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/sandbox/processwrapper-sandbox/3/execroot/_main/external/rules_dotnet~~paket2bazel_dependencies_extension~nuget.fsharp.core.v9.0.100/lib/netstandard2.1/FSharp.Core.dll': The exception has been reported. This internal exception should now be caught at an error recovery point on the stack. Original message: File '/home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/sandbox/processwrapper-sandbox/3/execroot/_main/external/rules_dotnet~~paket2bazel_dependencies_extension~nuget.fsharp.core.v9.0.100/lib/netstandard2.1/FSharp.Core.optdata' not found alongside FSharp.Core. File expected in /home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/sandbox/processwrapper-sandbox/3/execroot/_main/external/rules_dotnet~~paket2bazel_dependencies_extension~nuget.fsharp.core.v9.0.100/lib/netstandard2.1/FSharp.Core.optdata. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required.)
error FS3160: Problem reading assembly '/home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/sandbox/processwrapper-sandbox/3/execroot/_main/external/rules_dotnet~~paket2bazel_dependencies_extension~nuget.fsharp.core.v9.0.100/lib/netstandard2.1/FSharp.Core.dll': The exception has been reported. This internal exception should now be caught at an error recovery point on the stack. Original message: Error opening binary file '/home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/sandbox/processwrapper-sandbox/3/execroot/_main/external/rules_dotnet~~paket2bazel_dependencies_extension~nuget.fsharp.core.v9.0.100/lib/netstandard2.1/FSharp.Core.dll': The exception has been reported. This internal exception should now be caught at an error recovery point on the stack. Original message: File '/home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/sandbox/processwrapper-sandbox/3/execroot/_main/external/rules_dotnet~~paket2bazel_dependencies_extension~nuget.fsharp.core.v9.0.100/lib/netstandard2.1/FSharp.Core.optdata' not found alongside FSharp.Core. File expected in /home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/sandbox/processwrapper-sandbox/3/execroot/_main/external/rules_dotnet~~paket2bazel_dependencies_extension~nuget.fsharp.core.v9.0.100/lib/netstandard2.1/FSharp.Core.optdata. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required.))
error FS0073: internal error: BuildFrameworkTcImports: no successful import of /home/njlr/.cache/bazel/_bazel_njlr/41a7e2597ac2668adfaaefdbd2f1aca7/sandbox/processwrapper-sandbox/3/execroot/_main/external/rules_dotnet~~paket2bazel_dependencies_extension~nuget.fsharp.core.v9.0.100/lib/netstandard2.1/FSharp.Core.dll
Target @@rules_dotnet~//tools/paket2bazel:paket2bazel failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.315s, Critical Path: 0.56s
INFO: 16 processes: 16 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
```
Here is the `MODULE.bazel`:
```starlark
bazel_dep(name = "rules_dotnet", version = "0.17.5")
dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")
dotnet.toolchain(dotnet_version = "6.0.200")
use_repo(dotnet, "dotnet_toolchains")
register_toolchains("@dotnet_toolchains//:all")
# main_extension = use_extension("//paket:paket.main_extension.bzl", "main_extension")
# use_repo(main_extension, "paket.main")
```
And `.bazelversion`:
```
7.4.1
```
Full repro here: https://github.com/njlr/rules-dotnet-paket2bazel-6
Contributor guide
Research direction
Reproduce `bazel run @rules_dotnet//tools/paket2bazel` using the provided MODULE.bazel and `.bazelversion` in the linked repro. Start with `dotnet/private/sdk/gen/BUILD.bazel`, the compiler wrapper, and the reported FSharp.Core dependency; done means the paket2bazel target builds and runs without the missing `FSharp.Core.optdata` errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100