Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executable modules are built in too many ways #10418

Closed
mpickering opened this issue Oct 3, 2024 · 0 comments · Fixed by #10419
Closed

Executable modules are built in too many ways #10418

mpickering opened this issue Oct 3, 2024 · 0 comments · Fixed by #10419

Comments

@mpickering
Copy link
Collaborator

A bug which I introduced into Cabal-3.14 means that modules belonging to executables are built in all the configured library ways.

When building an executable, the Haskell modules need to be built

  • For the final link way
  • For the build way of the compiler if TH is enabled

At the moment they may be built for vanilla, dynamic and profiling. Even if the final executable we want to link statically.

I have a patch and test which fixes this.

mpickering added a commit to mpickering/cabal that referenced this issue Oct 3, 2024
…y ways

In the profiling dynamic patch I made a mistake when computing the
needed ways for a build.

When building an executable, the Haskell modules need to be built

* For the final link way
* For the build way of the compiler if TH is enabled

Before this patch, the modules were being built for all the configured
library ways, which built modules in more configurations than the
previous version of Cabal.

Fixes haskell#10418
mpickering added a commit to mpickering/cabal that referenced this issue Oct 3, 2024
…y ways

In the profiling dynamic patch I made a mistake when computing the
needed ways for a build.

When building an executable, the Haskell modules need to be built

* For the final link way
* For the build way of the compiler if TH is enabled

Before this patch, the modules were being built for all the configured
library ways, which built modules in more configurations than the
previous version of Cabal.

Fixes haskell#10418
mpickering added a commit to mpickering/cabal that referenced this issue Oct 4, 2024
…y ways

In the profiling dynamic patch I made a mistake when computing the
needed ways for a build.

When building an executable, the Haskell modules need to be built

* For the final link way
* For the build way of the compiler if TH is enabled

Before this patch, the modules were being built for all the configured
library ways, which built modules in more configurations than the
previous version of Cabal.

Fixes haskell#10418
Mikolaj pushed a commit to mpickering/cabal that referenced this issue Oct 4, 2024
…y ways

In the profiling dynamic patch I made a mistake when computing the
needed ways for a build.

When building an executable, the Haskell modules need to be built

* For the final link way
* For the build way of the compiler if TH is enabled

Before this patch, the modules were being built for all the configured
library ways, which built modules in more configurations than the
previous version of Cabal.

Fixes haskell#10418
@mergify mergify bot closed this as completed in #10419 Oct 4, 2024
mergify bot pushed a commit that referenced this issue Oct 4, 2024
…y ways

In the profiling dynamic patch I made a mistake when computing the
needed ways for a build.

When building an executable, the Haskell modules need to be built

* For the final link way
* For the build way of the compiler if TH is enabled

Before this patch, the modules were being built for all the configured
library ways, which built modules in more configurations than the
previous version of Cabal.

Fixes #10418

(cherry picked from commit 27c2668)
mergify bot pushed a commit that referenced this issue Oct 4, 2024
…y ways

In the profiling dynamic patch I made a mistake when computing the
needed ways for a build.

When building an executable, the Haskell modules need to be built

* For the final link way
* For the build way of the compiler if TH is enabled

Before this patch, the modules were being built for all the configured
library ways, which built modules in more configurations than the
previous version of Cabal.

Fixes #10418

(cherry picked from commit 27c2668)

# Conflicts:
#	Cabal/src/Distribution/Simple/GHC/Build.hs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant