vlang / vlang/gitly

Error building on Alpine (on Windows builds ok)

Open
#254 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
V
Stars
1.5k
Forks
79
PR merge metrics
No merged PRs in 30d

Description

When I try to clone and build gitly on Alpine Linux 3.18 using v version: V 0.4.0 3c26bff, I get errors:
F.e.:

/src/feed_service.v:14:23: error: exec() returns a Result, so it should have either an `or {}` block, or `!` at the end
   12 |     where_repo_ids := repo_ids.map(it.str()).join(', ')
   13 |
   14 |     commits, _ := app.db.exec('
      |                          ~~~~~~
   15 |         select author, hash, created_at, repo_id, branch_id, message from `Commit`
   16 |             where repo_id in (${where_repo_ids}) order by created_at desc
/src/feed_service.v:20:16: error: invalid variable `commits`
   18 |     mut item_id := 0
   19 |
   20 |     for commit in commits {
      |                   ~~~~~~~
   21 |         vals := commit.vals
   22 |         author_name := vals[0]
/src/feed_service.v:21:18: error: `commit` does not return a value
   19 |
   20 |     for commit in commits {
   21 |         vals := commit.vals
      |                        ~~~~
   22 |         author_name := vals[0]
   23 |         commit_hash := vals[1]

etc
Compiler used on Alpine Linux: -cc gcc

At the same time, on Windows 10 the same repository builds successfully using v version: V 0.4.0 320057d and tcc compiler.

Probably compiler (gcc vs tcc) is the errors' cause?

I'm not an expert in C compilers etc, so I may be wrong.

Appreciate any help!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the build on Alpine Linux 3.18 with V 0.4.0, gcc, and the reported repository revision, then compare it with the Windows build using tcc. Inspect the errors in src/feed_service.v and determine whether the compiler or V version causes them; done means the project builds successfully on Alpine.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.