Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
24 changes: 11 additions & 13 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Rust
name: CI
permissions:
contents: read

on:
pull_request:
Expand All @@ -14,20 +16,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
# Install Nix
- uses: cachix/install-nix-action@v27
with:
toolchain: stable
targets: wasm32-unknown-unknown
components: clippy, rustfmt
github_access_token: ${{ secrets.GITHUB_TOKEN }}

# Install Just to run CI scripts
- uses: extractions/setup-just@v3
# Use our flake to get all development tools (Rust, pnpm, just, cargo tools, etc.)
- run: nix develop --command echo "Development environment ready"

# Cargo binstall is used to install tools faster than compiling them from source.
- uses: cargo-bins/cargo-binstall@main
- run: just setup-tools
# Set RUSTFLAGS
- run: echo "RUSTFLAGS=--cfg=web_sys_unstable_apis" >> $GITHUB_ENV

# Make sure u guys don't write bad code
- run: just check
- run: just test
- run: nix develop --command just check
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
target
Cargo.lock

# Node.js
node_modules/
dist/
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify Node.js usage in the project.

The .gitignore adds node_modules/ and dist/ (Node.js artifacts), and the CI workflow comment on line 24 of .github/workflows/pr.yml mentions "pnpm", but flake.nix doesn't include Node.js, npm, or pnpm in the tools list. Either these tools should be added to flake.nix, or these ignore patterns may be premature.

Run the following script to check if Node.js/npm/pnpm are referenced elsewhere in the project:


🏁 Script executed:

#!/bin/bash
# Check for Node.js/npm/pnpm usage in the project
echo "=== Checking for package.json ==="
fd -t f '^package\.json$'

echo -e "\n=== Checking for pnpm references ==="
rg -n 'pnpm' --type-add 'nix:*.nix' --type nix --type yaml

echo -e "\n=== Checking for node/npm references in justfile ==="
fd -t f '^[Jj]ustfile$' --exec cat {}

Length of output: 3152


I need to verify the specific claims about pnpm and check the flake.nix configuration:


🏁 Script executed:

#!/bin/bash
# Check the CI workflow file for pnpm references
echo "=== Checking .github/workflows/pr.yml around line 24 ==="
if [ -f ".github/workflows/pr.yml" ]; then
  sed -n '15,35p' .github/workflows/pr.yml
else
  echo "File not found"
fi

echo -e "\n=== Checking for flake.nix ==="
if [ -f "flake.nix" ]; then
  echo "flake.nix exists"
  echo -e "\n=== Full flake.nix content ==="
  cat flake.nix
else
  echo "flake.nix not found"
fi

echo -e "\n=== Checking package.json content in web-transport-quinn/web/package.json ==="
if [ -f "web-transport-quinn/web/package.json" ]; then
  head -20 web-transport-quinn/web/package.json
else
  echo "File not found"
fi

Length of output: 1632


Add Node.js tooling to flake.nix or remove Node.js references and gitignore entries.

The concern is valid: .github/workflows/pr.yml line 24 states "Use our flake to get all development tools (Rust, pnpm, just, cargo tools, etc.)" but flake.nix does not include nodejs, npm, or pnpm in its tools list. Meanwhile, package.json files exist in web-transport-quinn/web/ and web-transport-ws/ with Node.js dependencies (e.g., Parcel), making the node_modules/ and dist/ entries in .gitignore functional orphans—CI cannot build these packages since the Node.js toolchain is unavailable.

Either add pkgs.nodejs and pkgs.pnpm to the tools list in flake.nix, or remove the Node.js build artifacts from .gitignore and the misleading pnpm reference from the workflow comment.

🤖 Prompt for AI Agents
In .gitignore around lines 4 to 6, the repository ignores Node.js build
artifacts (node_modules/ and dist/) while flake.nix doesn't provide Node
toolchain, breaking CI; either update flake.nix to expose Node and pnpm (add
pkgs.nodejs and pkgs.pnpm to the tools/devShell so the workflow can install and
build JS packages) or remove Node.js references: delete node_modules/ and dist/
from .gitignore and remove/mend the pnpm mention in .github/workflows/pr.yml so
the workflow comment no longer promises Node tooling; pick one approach and make
corresponding changes across flake.nix and the workflow comment to keep tooling
and ignore rules consistent.


# Direnv
.direnv/
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
description = "Web Transport development environment";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };

tools = [
pkgs.rustc
pkgs.cargo
pkgs.rustfmt
pkgs.clippy
pkgs.cargo-shear
pkgs.cargo-sort
pkgs.cargo-edit
pkgs.just
pkgs.pkg-config
pkgs.glib
pkgs.gtk3
];
in
{
devShells.default = pkgs.mkShell {
packages = tools;
};
}
);
}
Loading