Repository: bearcove/loona (language: rust)

Issue:
Run httpwg-gen in CI, fail if generated file is different from committed file.
Pretty easy contrib, just don't feel like wrangling GHA today.


Discussion / hints:

Fix patch:
diff --git a/crates/httpwg-gen/src/ast.rs b/crates/httpwg-gen/src/ast.rs
index 717cdbe4..53446d52 100644
--- a/crates/httpwg-gen/src/ast.rs
+++ b/crates/httpwg-gen/src/ast.rs
@@ -39,6 +39,7 @@ pub enum ItemInner {
     AssocConst(AssocConst),
     Struct(Struct),
     Constant(Constant),
+    TypeAlias(TypeAlias),
 }
 
 #[derive(Deserialize)]
@@ -72,3 +73,6 @@ pub struct Struct {}
 
 #[derive(Deserialize)]
 pub struct Constant {}
+
+#[derive(Deserialize)]
+pub struct TypeAlias {}


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 3b65777d..e21af2b3 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -65,3 +65,35 @@ jobs:
           fail_ci_if_error: true
           verbose: true
           file: coverage/lcov.info
+  httpwg-gen:
+    env:
+      CARGO_TERM_COLOR: always
+    runs-on:
+      - namespace-profile-linux-amd64
+    steps:
+      - name: Check out repository code
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 2
+      - name: Setup cargo cache
+        uses: namespacelabs/nscloud-cache-action@v1
+        with:
+          path: |
+            ./target
+            ./target-cov
+            ~/.cargo/git
+            ~/.cargo/registry
+            ~/.rustup
+      - name: Install Rust specified toolchain
+        run: |
+          rustc --version
+      - uses: taiki-e/install-action@v2
+        with:
+          tool: just,cargo-nextest,cargo-llvm-cov
+      - name: Generate httpwg-macros
+        run: |
+          cd ${{ github.workspace }}
+          just httpwg-gen
+      - name: Assert there are no changes
+        run: |
+          git diff --exit-code