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

An interactive debugger for Crucible{,-LLVM} #1283

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

langston-barrett
Copy link
Contributor

The README and golden test files are a good place to start understanding the capabilities and goals.

@langston-barrett
Copy link
Contributor Author

Not really sure why the CI builds are failing

+ cabal v2-build exe:crux-go
Resolving dependencies...
Error: cabal-3.10.3.0.exe: Could not resolve dependencies:
[__0] trying: crucible-debug-0.1.0 (user goal)
[__1] trying: ring-buffer-0.4 (dependency of crucible-debug)
[__2] next goal: base (dependency of crucible-debug)
[__2] rejecting: base-4.19.1.0/installed-6554 (conflict: ring-buffer =>
base>=4.7 && <4.11)
[__2] skipping: base-4.20.0.1, base-4.20.0.0, base-4.19.1.0, base-4.19.0.0,
base-4.18.2.1, base-4.18.2.0, base-4.18.1.0, base-4.18.0.0, base-4.17.2.1,
base-4.17.2.0, base-4.17.1.0, base-4.17.0.0, base-4.16.4.0, base-4.16.3.0,
base-4.16.2.0, base-4.16.1.0, base-4.16.0.0, base-4.15.1.0, base-4.15.0.0,
base-4.14.3.0, base-4.14.2.0, base-4.14.1.0, base-4.14.0.0, base-4.13.0.0,
base-4.12.0.0, base-4.11.1.0, base-4.11.0.0 (has the same characteristics that
caused the previous version to fail: excluded by constraint '>=4.7 && <4.11'
from 'ring-buffer')
[__2] rejecting: base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0,
base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1,
base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0,
base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2,
base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2,
base-3.0.3.1 (constraint from project config
D:\a\crucible\crucible\cabal.project.freeze requires ==4.19.1.0)
[__2] fail (backjumping, conflict set: base, crucible-debug, ring-buffer)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ring-buffer, crucible-debug

ring-buffer 0.4.1 should work, I don't understand why Cabal isn't seeing that version.

@langston-barrett
Copy link
Contributor Author

Oh, perhaps this has to do with the cabal.GHC-*.config files? Perhaps I need to regenerate those somehow?

@RyanGlScott
Copy link
Contributor

Indeed, the build plan requires ring-buffer-0.4.1, but the Hackage index state that the freeze files (i.e., the cabal.GHC-*.config files) pin against is too old to include that ring-buffer version. Likely the simplest way to fix this would be to regenerate the freeze files, as described here.

@langston-barrett langston-barrett force-pushed the lb/crucible-debug branch 3 times, most recently from 6776f00 to 714a51c Compare February 5, 2025 21:51
@langston-barrett
Copy link
Contributor Author

Hmm, now Windows builds are failing with

+ cabal v2-build exe:crucible-wasm
Command failed. Attempt 3/3:
Resolving dependencies...
Error: cabal-3.10.3.0.exe: Could not resolve dependencies:
[__0] trying: crux-llvm-0.9.0.99 (user goal)
[__1] trying: websockets-0.13.0.0 (dependency of crux-llvm)
[__2] trying: entropy-0.4.1.11 (dependency of websockets)
[__3] next goal: entropy:setup.process (dependency of entropy)
[__3] rejecting: entropy:setup.process-1.6.18.0/installed-4fb7 (constraint
from project config D:\a\crucible\crucible\cabal.project.freeze requires
==1.6.25.0)
[__3] trying: entropy:setup.process-1.6.25.0
[__4] trying: entropy:setup.Win32-2.13.4.0/installed-b836 (dependency of
entropy:setup.process)
[__5] next goal: entropy:setup.Cabal (dependency of entropy)
[__5] rejecting: entropy:setup.Cabal-3.10.2.0/installed-00ad,
entropy:setup.Cabal-3.14.1.1, entropy:setup.Cabal-3.14.1.0,
entropy:setup.Cabal-3.14.0.0, entropy:setup.Cabal-3.12.1.0,
entropy:setup.Cabal-3.12.0.0 (constraint from project config
D:\a\crucible\crucible\cabal.project.freeze requires ==3.10.3.0)
[__5] trying: entropy:setup.Cabal-3.10.3.0
[__6] next goal: entropy:setup.Cabal-syntax (dependency of
entropy:setup.Cabal)
[__6] rejecting: entropy:setup.Cabal-syntax-3.10.2.0/installed-5557,
entropy:setup.Cabal-syntax-3.14.1.0, entropy:setup.Cabal-syntax-3.14.0.0,
entropy:setup.Cabal-syntax-3.12.1.0, entropy:setup.Cabal-syntax-3.12.0.0
(constraint from project config D:\a\crucible\crucible\cabal.project.freeze
requires ==3.10.3.0)
[__6] trying: entropy:setup.Cabal-syntax-3.10.3.0
[__7] trying: Win32~>entropy:setup.Win32-2.13.4.0/installed-b836 (dependency
of entropy)
[__8] trying: process~>entropy:setup.process-1.6.25.0 (dependency of
crux-llvm)
[__9] next goal: filepath (dependency of crux-llvm)
[__9] rejecting: filepath-1.5.4.0 (conflict: Win32 =>
filepath==1.4.200.1/installed-c504)
[__9] rejecting: filepath-1.5.3.0, filepath-1.5.2.0, filepath-1.4.301.0,
filepath-1.4.300.2, filepath-1.4.300.1, filepath-1.4.102.0,
filepath-1.4.101.0, filepath-1.4.2.2, filepath-1.4.2.1, filepath-1.4.2,
filepath-1.4.1.2, filepath-1.4.1.1, filepath-1.4.1.0, filepath-1.4.0.0,
filepath-1.3.0.2, filepath-1.3.0.1, filepath-1.3.0.0, filepath-1.2.0.1,
filepath-1.2.0.0, filepath-1.1.0.4, filepath-1.1.0.3, filepath-1.1.0.2,
filepath-1.1.0.1, filepath-1.1.0.0, filepath-1.0,
filepath-1.4.200.1/installed-c504, filepath-1.5.0.0, filepath-1.4.200.1,
filepath-1.4.200.0, filepath-1.4.100.4, filepath-1.4.100.3,
filepath-1.4.100.2, filepath-1.4.100.1, filepath-1.4.100.0 (constraint from
project config D:\a\crucible\crucible\cabal.project.freeze requires ==1.5.4.0)
[__9] fail (backjumping, conflict set: Win32, crux-llvm, filepath)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: directory, process,
entropy:setup.process, filepath, Win32, crux-llvm, entropy:setup.Cabal-syntax,
entropy, entropy:setup.Win32, entropy:setup.Cabal, websockets

Perhaps I need to specifically downgrade filepath in the freeze files...?

@RyanGlScott
Copy link
Contributor

Sigh... for whatever reasons, cabal is eager to pick a build plan with a more recent version of filepath than what is installed with GHC, which causes all sorts of build-related shenanigans down the line. My recommendation would be to explicitly force the use of the installed version of filepath, i.e.,

$ cabal freeze ... --constraint="filepath installed"

@langston-barrett langston-barrett force-pushed the lb/crucible-debug branch 5 times, most recently from 1127ef7 to ac9f48f Compare February 6, 2025 16:11
@langston-barrett langston-barrett marked this pull request as ready for review February 6, 2025 17:32
Copy link
Contributor

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hooray!

I have already reviewed most of this code with @langston-barrett on separate occasions, so naturally I don't have many specific review comments here. I definitely encourage other folks to give this a try themselves.

@langston-barrett langston-barrett merged commit 46a231e into master Feb 7, 2025
24 checks passed
@langston-barrett langston-barrett deleted the lb/crucible-debug branch February 7, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants