difftreelog
ci more realworld benchmarks
in: master
12 files changed
flake.nixdiffbeforeafterboth1{2 description = "Jrsonnet";3 inputs = {4 nixpkgs.url = "github:nixos/nixpkgs/release-25.11";5 fenix = {6 url = "github:CertainLach/fenix/fix/libatomic";7 inputs.nixpkgs.follows = "nixpkgs";8 };9 flake-parts = {10 url = "github:hercules-ci/flake-parts";11 inputs.nixpkgs-lib.follows = "nixpkgs";12 };13 hercules-ci-effects = {14 url = "github:hercules-ci/hercules-ci-effects";15 inputs.flake-parts.follows = "flake-parts";16 inputs.nixpkgs.follows = "nixpkgs";17 };18 treefmt-nix = {19 url = "github:numtide/treefmt-nix";20 inputs.nixpkgs.follows = "nixpkgs";21 };22 crane.url = "github:ipetkov/crane";23 shelly.url = "github:CertainLach/shelly";2425 cpp-jsonnet-for-tests = {26 url = "github:google/jsonnet";27 flake = false;28 };29 go-jsonnet-for-tests = {30 url = "github:google/go-jsonnet";31 flake = false;32 };33 };34 outputs =35 inputs:36 let37 inherit (inputs.nixpkgs.lib)38 mkIf39 mkForce40 optionals41 optionalAttrs42 concatMapStringsSep43 ;44 rel = system: inputs.self.legacyPackages.${system}.release;45 releaseSections = [46 {47 name = "Linux (glibc)";48 artifacts = [49 {50 label = "jrsonnet-x86_64-linux-glibc";51 drv = (rel "x86_64-linux").jrsonnet-linux-glibc;52 }53 {54 label = "jrsonnet-experimental-x86_64-linux-glibc";55 drv = (rel "x86_64-linux").jrsonnet-experimental-linux-glibc;56 }57 {58 label = "jrsonnet-aarch64-linux-glibc";59 drv = (rel "aarch64-linux").jrsonnet-linux-glibc;60 }61 {62 label = "jrsonnet-experimental-aarch64-linux-glibc";63 drv = (rel "aarch64-linux").jrsonnet-experimental-linux-glibc;64 }65 {66 label = "jrsonnet-i686-linux-glibc";67 drv = (rel "i686-linux").jrsonnet-linux-glibc;68 }69 {70 label = "jrsonnet-experimental-i686-linux-glibc";71 drv = (rel "i686-linux").jrsonnet-experimental-linux-glibc;72 }73 {74 label = "jrsonnet-armv7l-linux-glibc";75 drv = (rel "armv7l-linux").jrsonnet-linux-glibc;76 }77 {78 label = "jrsonnet-experimental-armv7l-linux-glibc";79 drv = (rel "armv7l-linux").jrsonnet-experimental-linux-glibc;80 }81 ];82 }83 {84 name = "Linux (musl)";85 artifacts = [86 {87 label = "jrsonnet-x86_64-linux-musl";88 drv = (rel "x86_64-linux").jrsonnet-linux-musl;89 }90 {91 label = "jrsonnet-experimental-x86_64-linux-musl";92 drv = (rel "x86_64-linux").jrsonnet-experimental-linux-musl;93 }94 {95 label = "jrsonnet-aarch64-linux-musl";96 drv = (rel "aarch64-linux").jrsonnet-linux-musl;97 }98 {99 label = "jrsonnet-experimental-aarch64-linux-musl";100 drv = (rel "aarch64-linux").jrsonnet-experimental-linux-musl;101 }102 ];103 }104 {105 name = "macOS";106 artifacts = [107 {108 label = "jrsonnet-aarch64-darwin";109 drv = (rel "aarch64-linux").jrsonnet-darwin;110 }111 {112 label = "jrsonnet-experimental-aarch64-darwin";113 drv = (rel "aarch64-linux").jrsonnet-experimental-darwin;114 }115 ];116 }117 {118 name = "Windows";119 artifacts = [120 {121 label = "jrsonnet-x86_64-windows";122 drv = (rel "x86_64-linux").jrsonnet-windows;123 windows = true;124 }125 {126 label = "jrsonnet-experimental-x86_64-windows";127 drv = (rel "x86_64-linux").jrsonnet-experimental-windows;128 windows = true;129 }130 ];131 }132 ];133 releaseArtifacts = builtins.concatMap (s: s.artifacts) releaseSections;134 in135 inputs.flake-parts.lib.mkFlake { inherit inputs; } {136 imports = [137 inputs.shelly.flakeModule138 inputs.hercules-ci-effects.flakeModule139 ./nix/post-comment.nix140 ];141 systems = [142 "x86_64-linux"143 "i686-linux"144 "aarch64-linux"145 "armv7l-linux"146 "aarch64-darwin"147 ];148 perSystem =149 {150 config,151 self',152 system,153 ...154 }:155 let156 pkgs = import inputs.nixpkgs {157 inherit system;158 overlays = [ inputs.fenix.overlays.default ];159 config.allowUnsupportedSystem = true;160 config.allowUnfreePredicate = pkg: pkg.name == "Xcode.app";161 };162 targetArch = pkgs.stdenv.hostPlatform.parsed.cpu.name;163 rustfmt = (pkgs.fenix.complete or pkgs.fenix.stable).rustfmt;164 toolchain = pkgs.fenix.combine [165 (pkgs.fenix.stable.withComponents [166 "cargo"167 "clippy"168 "rustc"169 "rustfmt"170 ])171 pkgs.fenix.targets.wasm32-unknown-unknown.stable.rust-std172 ];173 devToolchain = pkgs.fenix.combine [174 ((pkgs.fenix.complete or pkgs.fenix.stable).withComponents [175 "cargo"176 "clippy"177 "rustc"178 "rust-src"179 "rustfmt"180 "rust-analyzer"181 ])182 pkgs.fenix.targets.wasm32-unknown-unknown.latest.rust-std183 ];184 craneLib = (inputs.crane.mkLib pkgs).overrideToolchain toolchain;185 craneLibDev = (inputs.crane.mkLib pkgs).overrideToolchain devToolchain;186 treefmt =187 (inputs.treefmt-nix.lib.evalModule pkgs (import ./treefmt.nix { inherit rustfmt; })).config.build;188189 # Cross-compilation toolchains190 crossToolchain = pkgs.fenix.combine [191 (pkgs.fenix.stable.withComponents [192 "cargo"193 "rustc"194 ])195 pkgs.fenix.targets."${targetArch}-unknown-linux-musl".stable.rust-std196 pkgs.fenix.targets."${targetArch}-apple-darwin".stable.rust-std197 ];198 craneLibCross = (inputs.crane.mkLib pkgs).overrideToolchain crossToolchain;199200 # Windows cross-compilation201 pkgsWindows = import inputs.nixpkgs {202 overlays = [ inputs.fenix.overlays.default ];203 localSystem = system;204 crossSystem = {205 config = "${targetArch}-w64-mingw32";206 libc = "msvcrt";207 };208 };209 windowsToolchain = pkgs.fenix.combine [210 (pkgs.fenix.stable.withComponents [211 "cargo"212 "rustc"213 ])214 pkgs.fenix.targets."${targetArch}-pc-windows-gnu".stable.rust-std215 ];216 craneLibWindows = (inputs.crane.mkLib pkgsWindows).overrideToolchain (_: windowsToolchain);217218 in219 {220 legacyPackages = {221 release = optionalAttrs pkgs.stdenv.hostPlatform.isLinux (222 {223 jrsonnet-linux-glibc = self'.packages.jrsonnet;224 jrsonnet-experimental-linux-glibc = self'.packages.jrsonnet-experimental;225 }226 // optionalAttrs pkgs.stdenv.hostPlatform.is64bit rec {227 jrsonnet-linux-musl = pkgs.callPackage ./nix/jrsonnet-cross-musl.nix {228 craneLib = craneLibCross;229 targetTriple = "${targetArch}-unknown-linux-musl";230 muslCC = pkgs.pkgsMusl.stdenv.cc;231 };232 jrsonnet-experimental-linux-musl = jrsonnet-linux-musl.override {233 withExperimentalFeatures = true;234 };235 }236 // optionalAttrs (targetArch == "aarch64") rec {237 jrsonnet-darwin = pkgs.callPackage ./nix/jrsonnet-cross-darwin.nix {238 craneLib = craneLibCross;239 targetTriple = "${targetArch}-apple-darwin";240 };241 jrsonnet-experimental-darwin = jrsonnet-darwin.override {242 withExperimentalFeatures = true;243 };244 }245 // optionalAttrs (targetArch == "x86_64") rec {246 jrsonnet-windows = pkgsWindows.callPackage ./nix/jrsonnet-cross-windows.nix {247 craneLib = craneLibWindows;248 targetTriple = "${targetArch}-pc-windows-gnu";249 };250 jrsonnet-experimental-windows = jrsonnet-windows.override {251 withExperimentalFeatures = true;252 };253 }254 );255 benchmarks = optionalAttrs (system == "x86_64-linux" || system == "aarch64-linux") {256 default = pkgs.callPackage ./nix/benchmarks.nix {257 inherit (config.legacyPackages.jsonnetImpls)258 go-jsonnet259 sjsonnet260 cpp-jsonnet261 rsjsonnet262 ;263 jrsonnetVariants = [264 {265 drv = self'.packages.jrsonnet.override { forBenchmarks = true; };266 name = "";267 }268 ];269 };270 quick = pkgs.callPackage ./nix/benchmarks.nix {271 inherit (config.legacyPackages.jsonnetImpls)272 go-jsonnet273 sjsonnet274 cpp-jsonnet275 rsjsonnet276 ;277 quick = true;278 jrsonnetVariants = [279 {280 drv = self'.packages.jrsonnet.override { forBenchmarks = true; };281 name = "";282 }283 ];284 };285 against-release = pkgs.callPackage ./nix/benchmarks.nix {286 inherit (config.legacyPackages.jsonnetImpls)287 go-jsonnet288 sjsonnet289 cpp-jsonnet290 rsjsonnet291 ;292 jrsonnetVariants = [293 {294 drv = self'.packages.jrsonnet.override { forBenchmarks = true; };295 name = "current";296 }297 {298 drv = self'.packages.jrsonnet-experimental.override { forBenchmarks = true; };299 name = "current-experimental";300 }301 {302 drv = self'.legacyPackages.jsonnetImpls.jrsonnet-release.override { forBenchmarks = true; };303 name = "release";304 }305 ];306 };307 quick-against-release = pkgs.callPackage ./nix/benchmarks.nix {308 inherit (config.legacyPackages.jsonnetImpls)309 go-jsonnet310 sjsonnet311 cpp-jsonnet312 rsjsonnet313 ;314 quick = true;315 jrsonnetVariants = [316 {317 drv = self'.packages.jrsonnet.override { forBenchmarks = true; };318 name = "current";319 }320 {321 drv = self'.packages.jrsonnet-experimental.override { forBenchmarks = true; };322 name = "current-experimental";323 }324 {325 drv = self'.legacyPackages.jsonnetImpls.jrsonnet-release.override { forBenchmarks = true; };326 name = "release";327 }328 ];329 };330 };331 jsonnetImpls = {332 go-jsonnet = pkgs.callPackage ./nix/go-jsonnet.nix { };333 sjsonnet = pkgs.callPackage ./nix/sjsonnet.nix { };334 cpp-jsonnet = pkgs.callPackage ./nix/cpp-jsonnet.nix { };335 # I didn't managed to build it, and nixpkgs version is marked as broken336 # haskell-jsonnet = pkgs.callPackage ./nix/haskell-jsonnet.nix { };337 rsjsonnet = pkgs.callPackage ./nix/rsjsonnet.nix { };338 # Older released version of jrsonnet itself, for benchmarking purposes339 jrsonnet-release = pkgs.callPackage ./nix/jrsonnet-release.nix {340 rustPlatform = pkgs.makeRustPlatform {341 rustc = toolchain;342 cargo = toolchain;343 };344 };345 };346 };347 packages =348 let349 jrsonnet = pkgs.callPackage ./nix/jrsonnet.nix {350 inherit craneLib;351 inherit (inputs) cpp-jsonnet-for-tests go-jsonnet-for-tests;352 };353 jrsonnet-experimental = pkgs.callPackage ./nix/jrsonnet.nix {354 inherit craneLib;355 inherit (inputs) cpp-jsonnet-for-tests go-jsonnet-for-tests;356 withExperimentalFeatures = true;357 };358 in359 {360 default = jrsonnet;361 inherit jrsonnet jrsonnet-experimental;362 };363 checks = optionalAttrs (system != "armv7l-linux") {364 formatting = treefmt.check inputs.self;365 };366 formatter = mkIf (system != "armv7l-linux") treefmt.wrapper;367 shelly.shells.default = {368 factory = craneLibDev.devShell;369 packages =370 with pkgs;371 [372 cargo-edit373 cargo-outdated374 cargo-watch375 cargo-insta376 cargo-hack377 cargo-show-asm378 lld379 hyperfine380 graphviz381 ]382 ++ optionals (!stdenv.isDarwin) [383 valgrind384 kdePackages.kcachegrind385 samply386 ];387 environment = {388 CPP_JSONNET_FOR_TESTS = inputs.cpp-jsonnet-for-tests;389 GO_JSONNET_FOR_TESTS = inputs.go-jsonnet-for-tests;390 };391 };392 shelly.shells.impls = {393 packages =394 (with self'.legacyPackages.jsonnetImpls; [395 cpp-jsonnet396 go-jsonnet397 rsjsonnet398 sjsonnet399 ])400 ++ (with self'.packages; [401 jrsonnet402 ]);403 };404 };405 hercules-ci.github-releases.files = map (a: {406 label = a.label + (if a.windows or false then ".exe" else "");407 path = "${a.drv}/bin/jrsonnet${ifa.windowsorfalsethen".exe"else""}";408 }) releaseArtifacts;409 hercules-ci.cargo-publish = {410 enable = true;411 secretName = "crates-io";412 extraPublishArgs = [ "--workspace" ];413 assertVersions = true;414 };415 hercules-ci.flake-update = {416 enable = true;417 baseMerge.enable = true;418 baseMerge.method = "fast-forward";419 when = {420 dayOfWeek = [ "Sat" ];421 };422 };423 hercules-ci.post-comment = {424 enable = true;425 caches = [ "jrsonnet.cachix.org" ];426 script =427 let428 benchmarks = inputs.self.legacyPackages.x86_64-linux.benchmarks.default;429 renderSection = s: ''430 echo431 echo "### ${s.name}"432 echo433 ${concatMapStringsSep"\n"(a''echo "- [${a.label}]($(nixTar ${a.drv}))"'')s.artifacts}434 '';435 in436 ''437 {438 echo "## Benchmark results"439 echo440 echo "[View rendered]($(nixRender ${benchmarks}))"441 echo442 echo "## Downloads"443 ${concatMapStringsSep"\n"renderSectionreleaseSections}444 } > $out445 '';446 };447 herculesCI =448 { lib, config, ... }:449 {450 ciSystems = [451 "x86_64-linux"452 "i686-linux"453 "aarch64-linux"454 "armv7l-linux"455 # TODO: add workers for these platforms456 # "aarch64-darwin"457 ];458 onPush.default.outputs = {459 benchmarks.x86_64-linux = inputs.self.legacyPackages.x86_64-linux.benchmarks.default;460461 # Cross: musl/mingw/darwin-zigbuild462 release.x86_64-linux = inputs.self.legacyPackages.x86_64-linux.release;463 release.aarch64-linux = inputs.self.legacyPackages.aarch64-linux.release;464 release.armv7l-linux = inputs.self.legacyPackages.armv7l-linux.release;465 release.i686-linux = inputs.self.legacyPackages.i686-linux.release;466467 # Too much to build for CI purposes468 devShells = mkForce { };469 formatter = mkForce { };470471 # No need to run them on different arch, pretty large derivations and might try to compile GHC472 checks.i686-linux.formatting = mkForce { };473 checks.aarch64-linux.formatting = mkForce { };474 };475 };476 };477}1{2 description = "Jrsonnet";3 inputs = {4 nixpkgs.url = "github:nixos/nixpkgs/release-25.11";5 fenix = {6 url = "github:CertainLach/fenix/fix/libatomic";7 inputs.nixpkgs.follows = "nixpkgs";8 };9 flake-parts = {10 url = "github:hercules-ci/flake-parts";11 inputs.nixpkgs-lib.follows = "nixpkgs";12 };13 hercules-ci-effects = {14 url = "github:hercules-ci/hercules-ci-effects";15 inputs.flake-parts.follows = "flake-parts";16 inputs.nixpkgs.follows = "nixpkgs";17 };18 treefmt-nix = {19 url = "github:numtide/treefmt-nix";20 inputs.nixpkgs.follows = "nixpkgs";21 };22 crane.url = "github:ipetkov/crane";23 shelly.url = "github:CertainLach/shelly";2425 cpp-jsonnet-for-tests = {26 url = "github:google/jsonnet";27 flake = false;28 };29 go-jsonnet-for-tests = {30 url = "github:google/go-jsonnet";31 flake = false;32 };33 };34 outputs =35 inputs:36 let37 inherit (inputs.nixpkgs.lib)38 mkIf39 mkForce40 optionals41 optionalAttrs42 concatMapStringsSep43 ;44 rel = system: inputs.self.legacyPackages.${system}.release;45 releaseSections = [46 {47 name = "Linux (glibc)";48 artifacts = [49 {50 label = "jrsonnet-x86_64-linux-glibc";51 drv = (rel "x86_64-linux").jrsonnet-linux-glibc;52 }53 {54 label = "jrsonnet-experimental-x86_64-linux-glibc";55 drv = (rel "x86_64-linux").jrsonnet-experimental-linux-glibc;56 }57 {58 label = "jrsonnet-aarch64-linux-glibc";59 drv = (rel "aarch64-linux").jrsonnet-linux-glibc;60 }61 {62 label = "jrsonnet-experimental-aarch64-linux-glibc";63 drv = (rel "aarch64-linux").jrsonnet-experimental-linux-glibc;64 }65 {66 label = "jrsonnet-i686-linux-glibc";67 drv = (rel "i686-linux").jrsonnet-linux-glibc;68 }69 {70 label = "jrsonnet-experimental-i686-linux-glibc";71 drv = (rel "i686-linux").jrsonnet-experimental-linux-glibc;72 }73 {74 label = "jrsonnet-armv7l-linux-glibc";75 drv = (rel "armv7l-linux").jrsonnet-linux-glibc;76 }77 {78 label = "jrsonnet-experimental-armv7l-linux-glibc";79 drv = (rel "armv7l-linux").jrsonnet-experimental-linux-glibc;80 }81 ];82 }83 {84 name = "Linux (musl)";85 artifacts = [86 {87 label = "jrsonnet-x86_64-linux-musl";88 drv = (rel "x86_64-linux").jrsonnet-linux-musl;89 }90 {91 label = "jrsonnet-experimental-x86_64-linux-musl";92 drv = (rel "x86_64-linux").jrsonnet-experimental-linux-musl;93 }94 {95 label = "jrsonnet-aarch64-linux-musl";96 drv = (rel "aarch64-linux").jrsonnet-linux-musl;97 }98 {99 label = "jrsonnet-experimental-aarch64-linux-musl";100 drv = (rel "aarch64-linux").jrsonnet-experimental-linux-musl;101 }102 ];103 }104 {105 name = "macOS";106 artifacts = [107 {108 label = "jrsonnet-aarch64-darwin";109 drv = (rel "aarch64-linux").jrsonnet-darwin;110 }111 {112 label = "jrsonnet-experimental-aarch64-darwin";113 drv = (rel "aarch64-linux").jrsonnet-experimental-darwin;114 }115 ];116 }117 {118 name = "Windows";119 artifacts = [120 {121 label = "jrsonnet-x86_64-windows";122 drv = (rel "x86_64-linux").jrsonnet-windows;123 windows = true;124 }125 {126 label = "jrsonnet-experimental-x86_64-windows";127 drv = (rel "x86_64-linux").jrsonnet-experimental-windows;128 windows = true;129 }130 ];131 }132 ];133 releaseArtifacts = builtins.concatMap (s: s.artifacts) releaseSections;134 in135 inputs.flake-parts.lib.mkFlake { inherit inputs; } {136 imports = [137 inputs.shelly.flakeModule138 inputs.hercules-ci-effects.flakeModule139 ./nix/post-comment.nix140 ];141 systems = [142 "x86_64-linux"143 "i686-linux"144 "aarch64-linux"145 "armv7l-linux"146 "aarch64-darwin"147 ];148 perSystem =149 {150 config,151 self',152 system,153 ...154 }:155 let156 pkgs = import inputs.nixpkgs {157 inherit system;158 overlays = [ inputs.fenix.overlays.default ];159 config.allowUnsupportedSystem = true;160 config.allowUnfreePredicate = pkg: pkg.name == "Xcode.app";161 };162 targetArch = pkgs.stdenv.hostPlatform.parsed.cpu.name;163 rustfmt = (pkgs.fenix.complete or pkgs.fenix.stable).rustfmt;164 toolchain = pkgs.fenix.combine [165 (pkgs.fenix.stable.withComponents [166 "cargo"167 "clippy"168 "rustc"169 "rustfmt"170 ])171 pkgs.fenix.targets.wasm32-unknown-unknown.stable.rust-std172 ];173 devToolchain = pkgs.fenix.combine [174 ((pkgs.fenix.complete or pkgs.fenix.stable).withComponents [175 "cargo"176 "clippy"177 "rustc"178 "rust-src"179 "rustfmt"180 "rust-analyzer"181 ])182 pkgs.fenix.targets.wasm32-unknown-unknown.latest.rust-std183 ];184 craneLib = (inputs.crane.mkLib pkgs).overrideToolchain toolchain;185 craneLibDev = (inputs.crane.mkLib pkgs).overrideToolchain devToolchain;186 treefmt =187 (inputs.treefmt-nix.lib.evalModule pkgs (import ./treefmt.nix { inherit rustfmt; })).config.build;188189 # Cross-compilation toolchains190 crossToolchain = pkgs.fenix.combine [191 (pkgs.fenix.stable.withComponents [192 "cargo"193 "rustc"194 ])195 pkgs.fenix.targets."${targetArch}-unknown-linux-musl".stable.rust-std196 pkgs.fenix.targets."${targetArch}-apple-darwin".stable.rust-std197 ];198 craneLibCross = (inputs.crane.mkLib pkgs).overrideToolchain crossToolchain;199200 # Windows cross-compilation201 pkgsWindows = import inputs.nixpkgs {202 overlays = [ inputs.fenix.overlays.default ];203 localSystem = system;204 crossSystem = {205 config = "${targetArch}-w64-mingw32";206 libc = "msvcrt";207 };208 };209 windowsToolchain = pkgs.fenix.combine [210 (pkgs.fenix.stable.withComponents [211 "cargo"212 "rustc"213 ])214 pkgs.fenix.targets."${targetArch}-pc-windows-gnu".stable.rust-std215 ];216 craneLibWindows = (inputs.crane.mkLib pkgsWindows).overrideToolchain (_: windowsToolchain);217218 in219 {220 legacyPackages = {221 fetchJrq = pkgs.callPackage ./nix/fetch-jrq.nix {222 inherit (self'.packages) jrsonnet;223 };224 release = optionalAttrs pkgs.stdenv.hostPlatform.isLinux (225 {226 jrsonnet-linux-glibc = self'.packages.jrsonnet;227 jrsonnet-experimental-linux-glibc = self'.packages.jrsonnet-experimental;228 }229 // optionalAttrs pkgs.stdenv.hostPlatform.is64bit rec {230 jrsonnet-linux-musl = pkgs.callPackage ./nix/jrsonnet-cross-musl.nix {231 craneLib = craneLibCross;232 targetTriple = "${targetArch}-unknown-linux-musl";233 muslCC = pkgs.pkgsMusl.stdenv.cc;234 };235 jrsonnet-experimental-linux-musl = jrsonnet-linux-musl.override {236 withExperimentalFeatures = true;237 };238 }239 // optionalAttrs (targetArch == "aarch64") rec {240 jrsonnet-darwin = pkgs.callPackage ./nix/jrsonnet-cross-darwin.nix {241 craneLib = craneLibCross;242 targetTriple = "${targetArch}-apple-darwin";243 };244 jrsonnet-experimental-darwin = jrsonnet-darwin.override {245 withExperimentalFeatures = true;246 };247 }248 // optionalAttrs (targetArch == "x86_64") rec {249 jrsonnet-windows = pkgsWindows.callPackage ./nix/jrsonnet-cross-windows.nix {250 craneLib = craneLibWindows;251 targetTriple = "${targetArch}-pc-windows-gnu";252 };253 jrsonnet-experimental-windows = jrsonnet-windows.override {254 withExperimentalFeatures = true;255 };256 }257 );258 benchmarks = optionalAttrs (system == "x86_64-linux" || system == "aarch64-linux") {259 default = pkgs.callPackage ./nix/benchmarks.nix {260 inherit (config.legacyPackages) fetchJrq;261 inherit (config.legacyPackages.jsonnetImpls)262 go-jsonnet263 sjsonnet264 cpp-jsonnet265 rsjsonnet266 ;267 jrsonnetVariants = [268 {269 drv = self'.packages.jrsonnet.override { forBenchmarks = true; };270 name = "";271 }272 ];273 };274 quick = pkgs.callPackage ./nix/benchmarks.nix {275 inherit (config.legacyPackages) fetchJrq;276 inherit (config.legacyPackages.jsonnetImpls)277 go-jsonnet278 sjsonnet279 cpp-jsonnet280 rsjsonnet281 ;282 quick = true;283 jrsonnetVariants = [284 {285 drv = self'.packages.jrsonnet.override { forBenchmarks = true; };286 name = "";287 }288 ];289 };290 against-release = pkgs.callPackage ./nix/benchmarks.nix {291 inherit (config.legacyPackages) fetchJrq;292 inherit (config.legacyPackages.jsonnetImpls)293 go-jsonnet294 sjsonnet295 cpp-jsonnet296 rsjsonnet297 ;298 jrsonnetVariants = [299 {300 drv = self'.packages.jrsonnet.override { forBenchmarks = true; };301 name = "current";302 }303 {304 drv = self'.packages.jrsonnet-experimental.override { forBenchmarks = true; };305 name = "current-experimental";306 }307 {308 drv = self'.legacyPackages.jsonnetImpls.jrsonnet-release.override { forBenchmarks = true; };309 name = "release";310 }311 ];312 };313 quick-against-release = pkgs.callPackage ./nix/benchmarks.nix {314 inherit (config.legacyPackages) fetchJrq;315 inherit (config.legacyPackages.jsonnetImpls)316 go-jsonnet317 sjsonnet318 cpp-jsonnet319 rsjsonnet320 ;321 quick = true;322 jrsonnetVariants = [323 {324 drv = self'.packages.jrsonnet.override { forBenchmarks = true; };325 name = "current";326 }327 {328 drv = self'.packages.jrsonnet-experimental.override { forBenchmarks = true; };329 name = "current-experimental";330 }331 {332 drv = self'.legacyPackages.jsonnetImpls.jrsonnet-release.override { forBenchmarks = true; };333 name = "release";334 }335 ];336 };337 };338 jsonnetImpls = {339 go-jsonnet = pkgs.callPackage ./nix/go-jsonnet.nix { };340 sjsonnet = pkgs.callPackage ./nix/sjsonnet.nix { };341 cpp-jsonnet = pkgs.callPackage ./nix/cpp-jsonnet.nix { };342 # I didn't managed to build it, and nixpkgs version is marked as broken343 # haskell-jsonnet = pkgs.callPackage ./nix/haskell-jsonnet.nix { };344 rsjsonnet = pkgs.callPackage ./nix/rsjsonnet.nix { };345 # Older released version of jrsonnet itself, for benchmarking purposes346 jrsonnet-release = pkgs.callPackage ./nix/jrsonnet-release.nix {347 rustPlatform = pkgs.makeRustPlatform {348 rustc = toolchain;349 cargo = toolchain;350 };351 };352 };353 };354 packages =355 let356 jrsonnet = pkgs.callPackage ./nix/jrsonnet.nix {357 inherit craneLib;358 inherit (inputs) cpp-jsonnet-for-tests go-jsonnet-for-tests;359 };360 jrsonnet-experimental = pkgs.callPackage ./nix/jrsonnet.nix {361 inherit craneLib;362 inherit (inputs) cpp-jsonnet-for-tests go-jsonnet-for-tests;363 withExperimentalFeatures = true;364 };365 in366 {367 default = jrsonnet;368 inherit jrsonnet jrsonnet-experimental;369 };370 checks = optionalAttrs (system != "armv7l-linux") {371 formatting = treefmt.check inputs.self;372 };373 formatter = mkIf (system != "armv7l-linux") treefmt.wrapper;374 shelly.shells.default = {375 factory = craneLibDev.devShell;376 packages =377 with pkgs;378 [379 cargo-edit380 cargo-outdated381 cargo-watch382 cargo-insta383 cargo-hack384 cargo-show-asm385 lld386 hyperfine387 graphviz388 ]389 ++ optionals (!stdenv.isDarwin) [390 valgrind391 kdePackages.kcachegrind392 samply393 ];394 environment = {395 CPP_JSONNET_FOR_TESTS = inputs.cpp-jsonnet-for-tests;396 GO_JSONNET_FOR_TESTS = inputs.go-jsonnet-for-tests;397 };398 };399 shelly.shells.impls = {400 packages =401 (with self'.legacyPackages.jsonnetImpls; [402 cpp-jsonnet403 go-jsonnet404 rsjsonnet405 sjsonnet406 ])407 ++ (with self'.packages; [408 jrsonnet409 ]);410 };411 };412 hercules-ci.github-releases.files = map (a: {413 label = a.label + (if a.windows or false then ".exe" else "");414 path = "${a.drv}/bin/jrsonnet${ifa.windowsorfalsethen".exe"else""}";415 }) releaseArtifacts;416 hercules-ci.cargo-publish = {417 enable = true;418 secretName = "crates-io";419 extraPublishArgs = [ "--workspace" ];420 assertVersions = true;421 };422 hercules-ci.flake-update = {423 enable = true;424 baseMerge.enable = true;425 baseMerge.method = "fast-forward";426 when = {427 dayOfWeek = [ "Sat" ];428 };429 };430 hercules-ci.post-comment = {431 enable = true;432 caches = [ "jrsonnet.cachix.org" ];433 script =434 let435 benchmarks = inputs.self.legacyPackages.x86_64-linux.benchmarks.default;436 renderSection = s: ''437 echo438 echo "### ${s.name}"439 echo440 ${concatMapStringsSep"\n"(a''echo "- [${a.label}]($(nixTar ${a.drv}))"'')s.artifacts}441 '';442 in443 ''444 {445 echo "## Benchmark results"446 echo447 echo "[View rendered]($(nixRender ${benchmarks}))"448 echo449 echo "## Downloads"450 ${concatMapStringsSep"\n"renderSectionreleaseSections}451 } > $out452 '';453 };454 herculesCI =455 { lib, config, ... }:456 {457 ciSystems = [458 "x86_64-linux"459 "i686-linux"460 "aarch64-linux"461 "armv7l-linux"462 # TODO: add workers for these platforms463 # "aarch64-darwin"464 ];465 onPush.default.outputs = {466 benchmarks.x86_64-linux = inputs.self.legacyPackages.x86_64-linux.benchmarks.default;467468 # Cross: musl/mingw/darwin-zigbuild469 release.x86_64-linux = inputs.self.legacyPackages.x86_64-linux.release;470 release.aarch64-linux = inputs.self.legacyPackages.aarch64-linux.release;471 release.armv7l-linux = inputs.self.legacyPackages.armv7l-linux.release;472 release.i686-linux = inputs.self.legacyPackages.i686-linux.release;473474 # Too much to build for CI purposes475 devShells = mkForce { };476 formatter = mkForce { };477478 # No need to run them on different arch, pretty large derivations and might try to compile GHC479 checks.i686-linux.formatting = mkForce { };480 checks.aarch64-linux.formatting = mkForce { };481 };482 };483 };484}nix/benchmarks.nixdiffbeforeafterboth--- a/nix/benchmarks.nix
+++ b/nix/benchmarks.nix
@@ -1,10 +1,9 @@
{
lib,
runCommand,
- jsonnet-bundler,
- cacert,
stdenv,
fetchFromGitHub,
+ fetchJrq,
go-jsonnet,
sjsonnet,
cpp-jsonnet,
@@ -23,29 +22,16 @@
rev = "bc305df3fe587960f7635f0185571500e5988475";
hash = "sha256-4EKB1b2o4/qtYQ+nqbbs621OJrtjApsAWEBcw5EjrYc=";
};
- kubePrometheusBench =
- let
- src = fetchFromGitHub {
- owner = "prometheus-operator";
- repo = "kube-prometheus";
- rev = "d3889807798d1697ea0691f10caf1b6a1997a8bd";
- hash = "sha256-TeYWHzoZAmDp2PzT7EH8XRUcvb3tR8Qfxel7o2QBvIM=";
- };
- in
- runCommand "kube-prometheus-vendor"
- {
- outputHash = "sha256-AGc0dHlD/Ld7I5b1+gOotzJkYrn+bB1VjISdD5NITtw=";
- outputHashMode = "recursive";
- buildInputs = [ cacert ];
- }
- ''
- mkdir -p $out
- cp -r ${src}/* $out/
- cd $out
- chmod u+w jsonnetfile.lock.json
- mkdir vendor
- ${jsonnet-bundler}/bin/jb install
- '';
+ realworldVendor = fetchJrq {
+ name = "realworld-vendor";
+ lockfile = ../tests/realworld/jsonnetfile.lock.json;
+ vendorHash = "sha256-6tXi6bRw77YKB17PhSpJnVYQcsGOvB8sgjKIrFtrwfc=";
+ };
+ realworldBench = runCommand "realworld-bench" { } ''
+ mkdir -p $out
+ cp ${../tests/realworld}/*.jsonnet ${../tests/realworld}/*.libsonnet $out/
+ cp -r ${realworldVendor} $out/vendor
+ '';
# Removes outsiders from the output
# Useful when comparing performance of different jrsonnet releases
@@ -77,8 +63,11 @@
skipScala ? "",
skipCpp ? "",
skipGo ? "",
- vendor ? "",
+ jpaths ? [ ],
}:
+ let
+ jpathArgs = concatMapStrings (p: " -J ${p}") jpaths;
+ in
''
echo >> $out
echo "=== ${name}" >> $out
@@ -122,7 +111,7 @@
concatStringsSep " " (
forEach jrsonnetVariants (
variant:
- "\"${variant.drv}/bin/jrsonnet $path${optionalString (vendor != "") " -J${vendor}"}\" -n \"Rust${
+ "\"${variant.drv}/bin/jrsonnet $path${jpathArgs}\" -n \"Rust${
if variant.name != "" then " (${variant.name})" else ""
}\""
)
@@ -130,26 +119,24 @@
} \
${
optionalString (skipRustAlternative == "")
- "\"rsjsonnet $path${
- optionalString (vendor != "") " -J ${vendor}"
- }\" -n \"Rust (alternative, rsjsonnet)\""
+ "\"rsjsonnet $path${jpathArgs}\" -n \"Rust (alternative, rsjsonnet)\""
} \
${
optionalString (skipGo == "")
- "\"go-jsonnet $path${optionalString (vendor != "") " -J ${vendor}"}\" -n \"Go\""
+ "\"go-jsonnet $path${jpathArgs}\" -n \"Go\""
} \
${
optionalString (skipScala == "")
- "\"sjsonnet-native $path${optionalString (vendor != "") " -J ${vendor}"}\" -n \"Scala (native)\""
+ "\"sjsonnet-native $path${jpathArgs}\" -n \"Scala (native)\""
} \
${
# My aarch64-linux machine can't run graalvm image:
# The current machine does not support all of the following CPU features that are required by the image: [FP, ASIMD, CRC32, LSE].
optionalString (skipScala == "" && stdenv.hostPlatform.system != "aarch64-linux")
- "\"sjsonnet-graalvm $path${optionalString (vendor != "") " -J ${vendor}"}\" -n \"Scala (GraalVM)\""
+ "\"sjsonnet-graalvm $path${jpathArgs}\" -n \"Scala (GraalVM)\""
} \
${optionalString (skipCpp == "")
- "\"jsonnet $path${optionalString (vendor != "") " -J ${vendor}"}\" -n \"C++\""
+ "\"jsonnet $path${jpathArgs}\" -n \"C++\""
}
cat result.adoc >> $out
'';
@@ -196,10 +183,36 @@
skipGo = skipSlow;
}}
${mkBench {
- name = "Kube-prometheus manifests";
- vendor = "${kubePrometheusBench}/vendor";
- path = "${kubePrometheusBench}/example.jsonnet";
- omitSource = true;
+ name = "Loki manifests";
+ path = "${realworldBench}/entry-loki.jsonnet";
+ jpaths = [ "${realworldBench}/vendor" ];
+ skipCpp = "too slow, takes hours, skews results";
+ skipGo = skipSlow;
+ }}
+ ${mkBench {
+ name = "Mimir manifests";
+ path = "${realworldBench}/entry-mimir.jsonnet";
+ jpaths = [ "${realworldBench}/vendor" ];
+ skipCpp = "too slow, takes hours, skews results";
+ skipGo = skipSlow;
+ }}
+ ${mkBench {
+ name = "Tempo manifests";
+ path = "${realworldBench}/entry-tempo.jsonnet";
+ jpaths = [ "${realworldBench}/vendor" ];
+ skipCpp = "too slow, takes hours, skews results";
+ skipGo = skipSlow;
+ }}
+ ${mkBench {
+ name = "GitLab runbooks dashboards";
+ path = "${realworldBench}/entry-gitlab-runbooks.jsonnet";
+ jpaths = [
+ "${realworldBench}/vendor"
+ "${realworldBench}/vendor/runbooks/libsonnet"
+ "${realworldBench}/vendor/runbooks/dashboards"
+ "${realworldBench}/vendor/runbooks/services"
+ "${realworldBench}/vendor/runbooks/metrics-catalog"
+ ];
skipCpp = "too slow, takes hours, skews results";
skipGo = skipSlow;
}}
nix/fetch-jrq.nixdiffbeforeafterboth--- /dev/null
+++ b/nix/fetch-jrq.nix
@@ -0,0 +1,49 @@
+{
+ lib,
+ stdenvNoCC,
+ cacert,
+ jrsonnet,
+}:
+{
+ lockfile,
+ vendorHash,
+ name ? "jrq-vendor",
+}:
+stdenvNoCC.mkDerivation (finalAttrs: {
+ inherit name;
+
+ outputHashMode = "recursive";
+ outputHashAlgo = "sha256";
+ outputHash = vendorHash;
+
+ nativeBuildInputs = [
+ jrsonnet
+ cacert
+ ];
+
+ dontUnpack = true;
+ dontConfigure = true;
+ dontInstall = true;
+ dontFixup = true;
+
+ SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
+ GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
+
+ buildPhase = ''
+ runHook preBuild
+
+ export HOME=$TMPDIR
+
+ install -m644 ${lockfile} jsonnetfile.json
+ install -m644 ${lockfile} jsonnetfile.lock.json
+
+ mkdir -p "$out"
+ jrb --jsonnetpkg-home "$out" install
+
+ runHook postBuild
+ '';
+
+ passthru = {
+ inherit lockfile vendorHash;
+ };
+})
tests/realworld/.gitignorediffbeforeafterboth--- /dev/null
+++ b/tests/realworld/.gitignore
@@ -0,0 +1 @@
+/vendor
tests/realworld/entry-gitlab-runbooks.jsonnetdiffbeforeafterboth--- /dev/null
+++ b/tests/realworld/entry-gitlab-runbooks.jsonnet
@@ -0,0 +1 @@
+import 'api/main.dashboard.jsonnet'
tests/realworld/entry-graalvm.jsonnetdiffbeforeafterboth--- /dev/null
+++ b/tests/realworld/entry-graalvm.jsonnet
@@ -0,0 +1,42 @@
+local common = import 'ci/ci_common/common.jsonnet';
+local graal_common = import 'graal-common.json';
+
+local compiler = import 'compiler/ci/ci.jsonnet';
+local wasm = import 'wasm/ci/ci.jsonnet';
+local espresso = import 'espresso/ci/ci.jsonnet';
+local regex = import 'regex/ci/ci.jsonnet';
+local sdk = import 'sdk/ci/ci.jsonnet';
+local substratevm = import 'substratevm/ci/ci.jsonnet';
+local sulong = import 'sulong/ci/ci.jsonnet';
+local tools = import 'tools/ci/ci.jsonnet';
+local truffle = import 'truffle/ci/ci.jsonnet';
+local javadoc = import 'ci_includes/publish-javadoc.jsonnet';
+local visualizer = import 'visualizer/ci/ci.jsonnet';
+local web_image = import 'web-image/ci/ci.jsonnet';
+
+{
+ ci_resources:: (import 'ci/ci_common/ci-resources.libsonnet'),
+ overlay: graal_common.ci.overlay,
+ specVersion: '7',
+ tierConfig: {
+ tier1: 'gate',
+ tier2: 'gate',
+ tier3: 'gate',
+ tier4: 'post-merge',
+ },
+ builds: [common.add_excludes_guard(common.with_style_component(b)) for b in (
+ common.with_components(compiler.builds, ['compiler']) +
+ common.with_components(wasm.builds, ['wasm']) +
+ common.with_components(espresso.builds, ['espresso']) +
+ common.with_components(regex.builds, ['regex']) +
+ common.with_components(sdk.builds, ['sdk']) +
+ common.with_components(substratevm.builds, ['svm']) +
+ common.with_components(sulong.builds, ['sulong']) +
+ common.with_components(tools.builds, ['tools']) +
+ common.with_components(truffle.builds, ['truffle']) +
+ common.with_components(javadoc.builds, ['javadoc']) +
+ common.with_components(visualizer.builds, ['visualizer']) +
+ common.with_components(web_image.builds, ['webimage'])
+ )],
+ assert (import 'ci/ci_common/run-spec-demo.jsonnet').check(),
+}
tests/realworld/entry-loki.jsonnetdiffbeforeafterboth--- /dev/null
+++ b/tests/realworld/entry-loki.jsonnet
@@ -0,0 +1,30 @@
+local loki = import 'loki/loki.libsonnet';
+
+loki {
+ _config+:: {
+ namespace: 'loki',
+ cluster: 'loki-bench',
+ storage_backend: 's3',
+ s3_address: 's3.example.com',
+ s3_bucket_name: 'loki-bench',
+ s3_access_key: 'AKIA',
+ s3_secret_access_key: 'SECRET',
+ boltdb_shipper_shared_store: 's3',
+
+ using_boltdb_shipper: false,
+ using_tsdb_shipper: true,
+ use_index_gateway: true,
+
+ loki+: {
+ schema_config+: {
+ configs: [{
+ from: '2024-01-01',
+ store: 'tsdb',
+ object_store: 's3',
+ schema: 'v13',
+ index: { prefix: 'loki_index_', period: '24h' },
+ }],
+ },
+ },
+ },
+}
tests/realworld/entry-mimir.jsonnetdiffbeforeafterboth--- /dev/null
+++ b/tests/realworld/entry-mimir.jsonnet
@@ -0,0 +1,14 @@
+local mimir = import 'mimir/mimir.libsonnet';
+
+mimir {
+ _config+:: {
+ namespace: 'mimir',
+ cluster: 'mimir-bench',
+ external_url: 'http://mimir.example.com',
+
+ storage_backend: 'gcs',
+ blocks_storage_bucket_name: 'mimir-blocks',
+ ruler_storage_bucket_name: 'mimir-ruler',
+ alertmanager_storage_bucket_name: 'mimir-alertmanager',
+ },
+}
tests/realworld/entry-tempo.jsonnetdiffbeforeafterboth--- /dev/null
+++ b/tests/realworld/entry-tempo.jsonnet
@@ -0,0 +1,36 @@
+local tempo = import 'microservices/tempo.libsonnet';
+
+tempo {
+ _images+:: {
+ tempo: 'grafana/tempo:latest',
+ tempo_vulture: 'grafana/tempo-vulture:latest',
+ tempo_query: 'grafana/tempo-query:latest',
+ },
+
+ _config+:: {
+ namespace: 'tracing',
+ distributor+: {
+ receivers: {
+ otlp: { protocols: { grpc: { endpoint: '0.0.0.0:4317' } } },
+ },
+ },
+ metrics_generator+: {
+ pvc_size: '10Gi',
+ pvc_storage_class: 'fast',
+ ephemeral_storage_request_size: '10Gi',
+ ephemeral_storage_limit_size: '11Gi',
+ },
+ live_store+: {
+ pvc_size: '10Gi',
+ pvc_storage_class: 'fast',
+ },
+ backend_scheduler+: {
+ pvc_size: '200Mi',
+ pvc_storage_class: 'fast',
+ },
+ backend: 'gcs',
+ bucket: 'tempo-bench',
+ kafka_address: 'kafka:9092',
+ kafka_topic: 'tempo',
+ },
+}
tests/realworld/jsonnetfile.jsondiffbeforeafterboth--- /dev/null
+++ b/tests/realworld/jsonnetfile.json
@@ -0,0 +1,52 @@
+{
+ "version": 1,
+ "dependencies": [
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/prometheus-operator/kube-prometheus"
+ }
+ }
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/oracle/graal"
+ }
+ }
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/loki",
+ "subdir": "production/ksonnet/loki"
+ }
+ }
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/mimir",
+ "subdir": "operations/mimir"
+ }
+ }
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/tempo",
+ "subdir": "operations/jsonnet/microservices"
+ }
+ }
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://gitlab.com/gitlab-com/runbooks"
+ }
+ },
+ "version": "c4082c94065b1b6a521eed59ed624478131cd9c0"
+ }
+ ],
+ "legacyImports": true
+}
tests/realworld/jsonnetfile.lock.jsondiffbeforeafterboth--- /dev/null
+++ b/tests/realworld/jsonnetfile.lock.json
@@ -0,0 +1,341 @@
+{
+ "version": 1,
+ "dependencies": [
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/prometheus-operator/kube-prometheus"
+ }
+ },
+ "version": "392c6c5e8e83c9a0f76355d4b0837dccf76ad7ea"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/jsonnet-libs.git",
+ "subdir": "mixin-utils"
+ }
+ },
+ "version": "3b8056670048416f5fb660dc039e473eb20a40b2"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/brancz/kubernetes-grafana",
+ "subdir": "grafana"
+ }
+ },
+ "version": "5698c8940b6dadca3f42107b7839557bc041761f"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/grafonnet-lib.git",
+ "subdir": "grafonnet"
+ }
+ },
+ "version": "a1d61cce1da59c71409b99b5c7568511fec661ea"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/grafana",
+ "subdir": "grafana-mixin"
+ }
+ },
+ "version": "278a9c4cb758a546229e2b408def7e3dcb5f4ec0",
+ "name": "grafana-mixin"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/etcd-io/etcd",
+ "subdir": "contrib/mixin"
+ }
+ },
+ "version": "0cbc031e7f224102bd1ec42a81f659a2b8c3350c"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/grafonnet.git",
+ "subdir": "gen/grafonnet-v10.0.0"
+ }
+ },
+ "version": "7380c9c64fb973f34c3ec46265621a2b0dee0058"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/jsonnet-libs/docsonnet.git",
+ "subdir": "doc-util"
+ }
+ },
+ "version": "bf6f08ae02a51c48bdcec4629b1c1a5a62c6f803"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/jsonnet-libs/xtd.git"
+ }
+ },
+ "version": "4d7f8cb24d613430799f9d56809cc6964f35cea9"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/prometheus-operator/prometheus-operator",
+ "subdir": "jsonnet/prometheus-operator"
+ }
+ },
+ "version": "288f0ae3f4ef14e3c75078cbd7dfe1857c3fb066"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/prometheus-operator/prometheus-operator",
+ "subdir": "jsonnet/mixin"
+ }
+ },
+ "version": "288f0ae3f4ef14e3c75078cbd7dfe1857c3fb066",
+ "name": "prometheus-operator-mixin"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/kubernetes-monitoring/kubernetes-mixin"
+ }
+ },
+ "version": "acd544dbd02ebce1e000abe006df6d2e4ac1438e"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/grafonnet.git",
+ "subdir": "gen/grafonnet-latest"
+ }
+ },
+ "version": "7380c9c64fb973f34c3ec46265621a2b0dee0058"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/grafonnet.git",
+ "subdir": "gen/grafonnet-v11.4.0"
+ }
+ },
+ "version": "7380c9c64fb973f34c3ec46265621a2b0dee0058"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/kubernetes/kube-state-metrics",
+ "subdir": "jsonnet/kube-state-metrics"
+ }
+ },
+ "version": "cd5430fd1834f43ffd093e3e22c2af1a625dbe2e"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/kubernetes/kube-state-metrics",
+ "subdir": "jsonnet/kube-state-metrics-mixin"
+ }
+ },
+ "version": "cd5430fd1834f43ffd093e3e22c2af1a625dbe2e"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/prometheus/node_exporter",
+ "subdir": "docs/node-mixin"
+ }
+ },
+ "version": "d6d0e710bb7daf07a2743fde060f0d5f32c565f3"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/prometheus/prometheus",
+ "subdir": "documentation/prometheus-mixin"
+ }
+ },
+ "version": "91c184a899b8e8237cdd08876fba54aa5f9feb6c",
+ "name": "prometheus"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/prometheus/alertmanager",
+ "subdir": "doc/alertmanager-mixin"
+ }
+ },
+ "version": "c85e06d3cd4ba24d003454ee11834404224d7763",
+ "name": "alertmanager"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/pyrra-dev/pyrra.git",
+ "subdir": "jsonnet/controller-gen"
+ }
+ },
+ "version": "25bac00a6c478211326eed4aa46583d1b9466ca8",
+ "name": "pyrra"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/thanos-io/thanos",
+ "subdir": "mixin"
+ }
+ },
+ "version": "cdca5483752e1635d249fbb1271978262775dc1b",
+ "name": "thanos-mixin"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/jsonnet-libs.git",
+ "subdir": "grafana-builder"
+ }
+ },
+ "version": "3b8056670048416f5fb660dc039e473eb20a40b2"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/oracle/graal"
+ }
+ },
+ "version": "d24e4efdac60ee798d7a795cf015f084556c912e"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/loki",
+ "subdir": "production/ksonnet/loki"
+ }
+ },
+ "version": "fe7f43b7f36d8f90931a3bfd35fadc83e1c23d5f"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/jsonnet-libs.git",
+ "subdir": "consul"
+ }
+ },
+ "version": "3b8056670048416f5fb660dc039e473eb20a40b2"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/jsonnet-libs.git",
+ "subdir": "jaeger-agent-mixin"
+ }
+ },
+ "version": "3b8056670048416f5fb660dc039e473eb20a40b2"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/jsonnet-libs.git",
+ "subdir": "ksonnet-util"
+ }
+ },
+ "version": "3b8056670048416f5fb660dc039e473eb20a40b2"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/jsonnet-libs.git",
+ "subdir": "memcached"
+ }
+ },
+ "version": "3b8056670048416f5fb660dc039e473eb20a40b2"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/mimir",
+ "subdir": "operations/mimir"
+ }
+ },
+ "version": "39dd4ffb859d0abb3951d406495bc4bd422600dd"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/rollout-operator.git",
+ "subdir": "operations/rollout-operator"
+ }
+ },
+ "version": "2afe062893496f0554b4764bbe1638f8019832fb"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/jsonnet-libs/keda-libsonnet.git",
+ "subdir": "2.15"
+ }
+ },
+ "version": "dbc8cf1a9847f123d8325378111155fb135983ab",
+ "name": "keda-libsonnet"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/tempo",
+ "subdir": "operations/jsonnet/microservices"
+ }
+ },
+ "version": "f6124c0dea954763dbaa461dcc7b8a89bc8d2635"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/jsonnet-libs/k8s-libsonnet.git",
+ "subdir": "1.32"
+ }
+ },
+ "version": "55380470fb7979e6ce0c4316cb9c27a266caf298"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/jsonnet-libs/vertical-pod-autoscaler-libsonnet.git",
+ "subdir": "1.0.0"
+ }
+ },
+ "version": "5d16cd466d12489e6ffba5b17813a0203016e68d"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://gitlab.com/gitlab-com/runbooks"
+ }
+ },
+ "version": "c4082c94065b1b6a521eed59ed624478131cd9c0"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/grafana/jsonnet-libs.git",
+ "subdir": "memcached-mixin"
+ }
+ },
+ "version": "3b8056670048416f5fb660dc039e473eb20a40b2"
+ },
+ {
+ "source": {
+ "git": {
+ "remote": "https://github.com/yugui/jsonnetunit.git",
+ "subdir": "jsonnetunit"
+ }
+ },
+ "version": "6927c58cae7624a00f368b977ccc477d4f74071f"
+ }
+ ],
+ "legacyImports": true
+}
tests/realworld/k.libsonnetdiffbeforeafterboth--- /dev/null
+++ b/tests/realworld/k.libsonnet
@@ -0,0 +1 @@
+import '1.32/main.libsonnet'