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

Dev basepoint #128

Merged
merged 46 commits into from
Mar 7, 2025
Merged

Dev basepoint #128

merged 46 commits into from
Mar 7, 2025

Conversation

NickSeagull
Copy link
Contributor

@NickSeagull NickSeagull commented Mar 7, 2025

Summary by CodeRabbit

  • New Features

    • Adopted a Nix‐based environment for building and development.
    • Introduced enhanced CLI command processing and directory management workflows.
  • Refactor

    • Streamlined logging and error reporting for clearer messages.
    • Optimized command parsing and build configurations.
  • Documentation

    • Updated installation instructions to reflect the switch to Nix tooling.
  • Chores

    • Revised configuration and version control ignore rules to improve stability and developer experience.

Copy link
Contributor

coderabbitai bot commented Mar 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The project has undergone a broad refactor affecting environment configuration, documentation, CLI tooling, core library functionality, and Nix build setups. The change replaces the use of Devenv with Nix for environment management, updates ignored file patterns, refines command parsing and error handling via a new Task abstraction, and enhances logging. Several new modules and functions have been introduced while legacy files have been removed or updated, consolidating behavior and simplifying the control flow across the system.

Changes

File(s) Change Summary
.envrc, .gitignore, .hlint.yaml, .vscode/settings.json Removed external source and switched from use devenv to use nix; expanded ignored files; reformatted HLint rules; updated VSCode settings (nix file path changed)
README.md, cabal.project Updated installation instructions from DevEnv to Nix (use nix-shell); narrowed package inclusion in cabal.project
cli/app/Main.hs, cli/nhcli.cabal, cli/src/Neo.{hs,Build.hs}, cli/src/Neo/Build/Templates/{Cabal,Nix}.hs, cli/src/Neo/Core.hs, cli/src/Neo/Core/ProjectConfiguration.hs, cli/test/Main.hs, cli/default.nix Refactored CLI logic: modified main signature (using Task.runOrPanic); updated command parsing (using new NeoCommand, CommonFlags); added template generators; introduced a Nix expression for CLI development
context/collections.md Renamed constructor function from wrap to yield
core/core/{Array.hs, Basics.hs, Console.hs, Core.hs, IO.hs, Map.hs, Maybe.hs, Task.hs, Text.hs, Unknown.hs, Version.hs} Enhanced core libraries: added array filtering functions; introduced the Task monad with new combinators; updated logging (switching from print to log/toPrettyText); added version text conversion; streamlined error handling
core/{default.nix, http/Http/Client.hs, json/Json.hs, nhcore.cabal} Revised build dependencies, updated error handling in HTTP and JSON modules, and exposed new version conversion functions
core/{options-parser/Command.hs, service/} Refactored command-line parsing to use Options.Applicative; replaced print with log across service modules; standardized error reporting with panic and toPrettyText
core/system/{Directory.hs, File.hs, Path.hs, Subprocess.hs} Added structured directory and file operations with improved error management; introduced new data types (e.g. OpenOptions, Completion) and refined task execution in subprocesses
core/{test/Main.hs, toml/Toml.hs, traits/{Default.hs, ToText.hs}} Updated test suite logging; removed deprecated TOML support and Default instance for Bool; added pretty-printing in ToText module
default.nix, devenv.{nix,yaml}, nix/nixpkgs.nix, sandbox/neo.json, shell.nix New Nix shell configuration introduced; integrated CLI’s Nix environment; removed legacy Devenv files; added a tarball fetch in nixpkgs and an example package JSON

Sequence Diagram(s)

sequenceDiagram
    participant Main as "CLI Main"
    participant Task as "Task Module"
    participant Neo as "Neo Module"
    Main->>Task: Invoke runOrPanic with Neo.run
    Task->>Neo: Parse command via commandsParser & buildParser
    Neo-->>Task: Execute Build command (handleCommand)
    Task-->>Main: Return result or trigger panic on error
Loading

Poem

In the realm of code, a new dawn unfolds,
Commands are sharpened, as ancient files grow old.
Environment reborn with Nix in its might,
Tasks and logs now guide our path through the night.
Rejoice, for our Haskell domain is now redefined! 🚀
All hail the clarity of our divine refactor!


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between deb9780 and dbcdef0.

⛔ Files ignored due to path filters (1)
  • devenv.lock is excluded by !**/*.lock
📒 Files selected for processing (54)
  • .envrc (1 hunks)
  • .gitignore (1 hunks)
  • .hlint.yaml (1 hunks)
  • .vscode/settings.json (2 hunks)
  • README.md (1 hunks)
  • cabal.project (1 hunks)
  • cli/app/Main.hs (1 hunks)
  • cli/default.nix (1 hunks)
  • cli/nhcli.cabal (2 hunks)
  • cli/src/Neo.hs (2 hunks)
  • cli/src/Neo/Build.hs (1 hunks)
  • cli/src/Neo/Build/Templates/Cabal.hs (1 hunks)
  • cli/src/Neo/Build/Templates/Nix.hs (1 hunks)
  • cli/src/Neo/Core.hs (1 hunks)
  • cli/src/Neo/Core/ProjectConfiguration.hs (1 hunks)
  • cli/test/Main.hs (1 hunks)
  • context/collections.md (1 hunks)
  • core/core/Array.hs (4 hunks)
  • core/core/Basics.hs (5 hunks)
  • core/core/Console.hs (3 hunks)
  • core/core/Core.hs (1 hunks)
  • core/core/IO.hs (2 hunks)
  • core/core/Map.hs (2 hunks)
  • core/core/Maybe.hs (4 hunks)
  • core/core/Task.hs (1 hunks)
  • core/core/Text.hs (1 hunks)
  • core/core/Unknown.hs (1 hunks)
  • core/core/Version.hs (3 hunks)
  • core/default.nix (1 hunks)
  • core/http/Http/Client.hs (1 hunks)
  • core/json/Json.hs (2 hunks)
  • core/nhcore.cabal (6 hunks)
  • core/options-parser/Command.hs (9 hunks)
  • core/service/Action.hs (4 hunks)
  • core/service/Html.hs (1 hunks)
  • core/service/Service.hs (6 hunks)
  • core/service/Service/ActionWorker.hs (3 hunks)
  • core/service/Service/EventWorker.hs (2 hunks)
  • core/service/Service/RenderWorker.hs (4 hunks)
  • core/service/Service/RuntimeState.hs (5 hunks)
  • core/system/Directory.hs (1 hunks)
  • core/system/File.hs (2 hunks)
  • core/system/Path.hs (3 hunks)
  • core/system/Subprocess.hs (1 hunks)
  • core/test/Main.hs (1 hunks)
  • core/toml/Toml.hs (0 hunks)
  • core/traits/Default.hs (0 hunks)
  • core/traits/ToText.hs (1 hunks)
  • default.nix (1 hunks)
  • devenv.nix (0 hunks)
  • devenv.yaml (0 hunks)
  • nix/nixpkgs.nix (1 hunks)
  • sandbox/neo.json (1 hunks)
  • shell.nix (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@NickSeagull NickSeagull merged commit 6c03d95 into main Mar 7, 2025
0 of 3 checks passed
@NickSeagull NickSeagull deleted the dev branch March 7, 2025 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant