### Enter Nix Development Shell Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Use 'nix develop' to enter the default development shell, or 'nix develop .#' to enter a specific shell like one for GHC 8.10.7. ```bash use `nix develop` or `nix develop .#ghc8107` to enter a development shell. ``` -------------------------------- ### Allow Direnv Environment Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Use this command to allow the direnv environment after setting up direnv. It enables the project's development environment configurations. ```bash direnv allow ``` -------------------------------- ### Run Tests with Std Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Run the tests for a specific application, such as 'prelude-tests', using the 'std' command. This command executes tests defined within the Nix build system. ```bash std //prelude/apps/cardano-prelude-test:test:prelude-tests:run ``` -------------------------------- ### List Available Devshells with Std Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Check available alternative compiler configurations using the 'std list' command. This helps in selecting a specific GHC version for development. ```bash $ std list | grep -Eo '//_automation/devshells/.*:enter' ``` -------------------------------- ### Build CI Dependencies with Std Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md If 'tullia run ci' does not work for local execution, use 'std' to build the required Nix job for CI. This is a fallback method for running CI-related builds. ```bash std //_automation/ciJobs/required:build ``` -------------------------------- ### Build All Packages with Cabal Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Update the cabal package index and then build all project packages using the 'cabal build all' command. This is a standard workflow for building the project with cabal. ```bash cabal update cabal build all ``` -------------------------------- ### Build Package with Std Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Build a specific Haskell package, such as 'cardano-prelude', using the 'std' command. This command leverages Nix for building Haskell projects. ```bash source <(std _carapace) # (Optional, for completion on zsh). std //prelude/packages/cardano-prelude:lib:cardano-prelude:build ``` -------------------------------- ### Run CI Jobs Locally with Tullia Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Execute the project's Continuous Integration (CI) jobs locally using the 'tullia run ci' command. This helps in verifying CI configurations before pushing changes. ```bash tullia run ci ``` -------------------------------- ### Test All Packages with Cabal Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Execute all project tests using the 'cabal test all' command. This is part of the standard testing workflow when using cabal. ```bash cabal test all ``` -------------------------------- ### Enter Alternative Devshell with Std Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Enter a specific development shell, such as one configured for GHC 8.10.7, using the 'std' command. This allows for development with different compiler versions. ```bash $ std //_automation/devshells/ghc8107:enter ``` -------------------------------- ### Set Alternative Compiler Permanently Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Configure the development environment to permanently use an alternative compiler by setting the DEVSHELL_TARGET in the .envrc.local file. This ensures the chosen compiler is used on subsequent environment loads. ```bash echo DEVSHELL_TARGET=ghc8107 >> .envrc.local direnv reload ``` -------------------------------- ### Update Nix Hackage Pin Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Update the Nix input for Hackage to fetch the latest package index state. This is necessary when updating the 'index-state' in 'cabal.project'. ```bash nix flake lock --update-input hackage ``` -------------------------------- ### Evaluate Last Index State Source: https://github.com/intersectmbo/cardano-prelude/blob/master/CONTRIBUTING.md Check the last available 'index-state' within the current Hackage pin using 'nix eval'. This command is useful for verifying the state of the cabal index after updates. ```bash nix eval .#last-index-state ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.