-
Notifications
You must be signed in to change notification settings - Fork 0
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
big Nix refactor #56
big Nix refactor #56
Conversation
bc4d6b0
to
4556a25
Compare
uuid = doJailbreak hprev.uuid; | ||
proto-lens = doJailbreak hprev.proto-lens; | ||
proto-lens-setup = doJailbreak hprev.proto-lens-setup; | ||
proto-lens-protobuf-types = lib.pipe hprev.proto-lens-protobuf-types [ | ||
doJailbreak | ||
(addSetupDepends [ protobuf ]) | ||
]; | ||
proto-lens-runtime = doJailbreak hprev.proto-lens-runtime; | ||
proto-lens-protoc = lib.pipe hprev.proto-lens-protoc [ | ||
doJailbreak | ||
(appendPatch (fetchpatch { | ||
url = "https://github.com/google/proto-lens/pull/494/commits/7694e28e3ebcfcbcf00ff3eae73949d069c4f21a.diff"; | ||
relative = "proto-lens-protoc"; | ||
# There's a patch conflict in the autogenerated hpack header. | ||
excludes = [ | ||
"package.yaml" | ||
"proto-lens-protoc.cabal" | ||
]; | ||
hash = "sha256-qpBh8XGwb30VjIb0VGrLhu/k5az6QrL8XioE9pxDtw4="; | ||
})) | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this whole section is kind of frustrating but it looks like all of this is just straight-up broken upstream so there's no way to work around it.
we could maybe avoid the doJailbreak
& appendPatch
for proto-lens
stuff by just fetching the latest source and building those package directly (since they've updated to support GHC 9.10 but not yet cut a new release).
3b303d6
to
c6d7011
Compare
{ haskell, ... }: | ||
hfinal: hprev: | ||
let | ||
inherit (haskell.lib.compose) markUnbroken; | ||
in | ||
{ | ||
hs-opentelemetry-propagator-datadog = markUnbroken hprev.hs-opentelemetry-propagator-datadog; | ||
if-instance = markUnbroken hprev.if-instance; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as of the latest nixpkgs unstable snapshot it looks like these need to be explicitly marked unbroken
@@ -507,7 +508,7 @@ startReplayWorker rt conf = provideCallStack $ runWorkerContext conf $ do | |||
workerActivityWorker = () | |||
workerActivityLoop = () | |||
workerType = Core.SReplay | |||
workerTracer = makeTracer conf.tracerProvider (InstrumentationLibrary "hs-temporal-sdk" "0.0.1.0") tracerOptions | |||
workerTracer = makeTracer conf.tracerProvider (InstrumentationLibrary "hs-temporal-sdk" "0.0.1.0" "" emptyAttributes) tracerOptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is basically what the detectInstrumentationLibrary
splice does
* 'aarch64' + GHC 9.8 seems to fail w/ a lot of cache misses * 'exclude' doesn't appear to union across all branches * adding 'devenv-up' to all branch 'exclude' doesn't stop it on 'main'
a few dependencies in the GHC 9.10 Haskell overlay are broken, even on the lastest unstable nixpkgs package set. in order to build this in CI, we need to jailbreak Cabal dependency bounds & (in one case) backport a patch.
* adds a Haskell overlay for dependencies that need to be overridden in all package sets * updates `temporal-sdk` to work with newer `hs-opentelemetry-api`
`overlays.development` applies a composition of `haskellOverlays` for each GHC version we want to build/test to their respective package sets. e.g. applying this overlay means that `pkgs.haskell.packages.ghc98` will contain `temporal-sdk` (& friends).
ac297f5
to
9ce150e
Compare
* extracts `protogen` to its own file * restores the Haskell package matrix & local dev package deps * restores `devenv` shells for the major GHC versiosn we're tracking
9ce150e
to
6d18846
Compare
more than likely that I will restructure this away from |
description
this refactors a bunch of the Nix code along the following lines:
flake-utils
toflake-parts
, so that flake outputs can be defined in terms of Nix modulesoutputs.overlays
&outputs.haskellOverlays
outputs.overlays.temporal-bridge
provides thetemporal_bridge
Rust packageoutputs.overlays.development
provides the GHC package sets that we use for our own development environment & CIoutputs.haskellOverlays.hs-temporal-sdk
provides just the packages we manage hereinoutputs.haskellOverlays.dependencies.default
provides package overrides for all GHC packages in our matrixoutputs.haskellOverlays.dependencies.ghc910
provides package overrides for just the GHC 9.10 package setfollowing this change, downstream consumers should be able to do something like:
...and then apply
outputs.overlays.temporal-bridge
to their Nix package set &outputs.haskellOverlays.hs-temporal-sdk
to the applicablehaskell.packages.${ghcVersion}
package set.todo
I should probably add a
README
to the Nix subdirectory explaining what's going on & providing a little context for how the overlays are meant to be consumed.notes
there's some stuff here that isn't as clean as I would like for it to be, but I think it's probably better to have this reviewed so we can support GHC 9.10 (& newer nixpkgs package sets) more easily.