← 输入框|github.com|刷新
Skip to content

Build0.sh fails when repo is forked in Github #1396

Closed

Description

@rebcabin

This morning, I created a fork of lcompilers/lpython so that I could submit pull requests according to github's recommendations. I got a cascade of build and test failures that I traced back to ./ci/version.sh, which calls git describe --tags --dirty. This call fails because the fork doesn't have any tags. It works only if executed in a clone of the original repo.

When executed in the fork, I get ...

(lp) ┌─(~/Documents/GitHub/lpython)──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(brian@Golf37:s004)─┐
└─(11:57:38 on main ✭)──> ./ci/version.sh                                                                                                                 ──(Tue,Jan03)─┘
++ git describe --tags --dirty
fatal: No names found, cannot describe anything.
+ version=

Activity

  1. Thirumalai-Shaktivel commented on Jan 4, 2023

    @Thirumalai-Shaktivel
    Collaborator

    Fetching tags from origin might work.

    git remote add lpython https://github.com/lcompilers/lpython.git
    git fetch lpython main
    

    and then Let's make a clean build:

    git clean -dfx
    ./build0.sh
    ./build1.sh
    
  2. certik commented on Jan 4, 2023

    @certik
    Contributor

    This failure happens when there are missing tags. I noticed it can be fragile sometimes, so we should make the script more robust against this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions