Skip to content

feat: commit graph view (Phase 2) - #309

Open
metif12 wants to merge 2 commits into
vlang:masterfrom
metif12:phase2/commit-graph
Open

metif12 wants to merge 2 commits into
vlang:masterfrom
metif12:phase2/commit-graph

Conversation

@metif12

@metif12 metif12 commented Nov 10, 2026

Copy link
Copy Markdown
Member

Adds a commit graph route rendering git log --graph --oneline --decorate --all. Phase 2 of Gitea parity roadmap.

office and others added 2 commits October 11, 2026 15:45
Master did not build at all. Three independent breakages, all verified by
reproducing each one before fixing it.

1. 32 vweb route handlers were declared without `mut ctx Context`.

   Current vweb dispatches `app.$method(mut user_context, ...args)`, so any
   handler taking at least one parameter must accept the context first.
   Handlers such as `user_repos` and `handle_admin_edit_user` already used
   `ctx` in their bodies without declaring it, and call sites such as
   `app.admin_users(mut ctx, '0')` already passed it, so this restores the
   signature the code was written against. `method.args` excludes the
   receiver, which is why one-parameter handlers failed while multi-param
   ones silently compiled.

2. `struct FileInfo` in repo/file.v collided with `os.FileInfo`.

   Substituting it into the `api.ApiSuccessResponse[T]` generic made V
   resolve the bare name in the wrong scope, emitting `os__FileInfo` as the
   declaration and `main__FileInfo` as the initialiser:

     src.c:67159:64: error: invalid initializer
       os__FileInfo __return_array_value_16 = *(main__FileInfo*)(array_get(...));

   Renamed to `RepoFileInfo`, which no stdlib type shadows.

3. `change_lang` was the only one-parameter handler, so it surfaced first
   and masked the rest; it is included in the set above.

Verified:
  - `v -d sqlite -o gitly.exe .` exits 0 and produces the binary.
  - `v -d sqlite test utils_test.v` -> 1 passed, 1 total.
  - `git diff --stat` touches only .v files; no build artifacts staged.

Note that `v test` compiles the whole project per test file, costing about
887s of comptime for a single file on Windows with VJOBS=2, so the tracked
suite cannot be run in full locally.
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