Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move tinyc to a separate repo and allow installing external dependencency (eg tinyc) from koch / library code #13850

Merged
merged 6 commits into from
Apr 3, 2020

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Apr 2, 2020

this PR addresses parts of nim-lang/RFCs#206

move out tinyc

EDIT: but I'm still allowing for tinyc to be re-installed (unlike #11529 which was closed because there was no way to install it back)

allow installing external dependency (eg tinyc etc) to Nim via koch

  • added tools/deps.nim to make it easy to update external dependency:
    proc cloneDependency*(destDirBase: string, url: string, commit = commitHead, appendRepoName = true)
    which is safe to re-run (for eg with different commit)

and using it from koch, eg:

./koch installdeps tinyc

this will clone https://github.com/timotheecour/nim-tinyc-archive at Nim/dist/nim-tinyc-archive at a fixed revision (the current git HEAD of that repo, corresponding to latest state of tinyc in nim's repo before this PR)

after this PR

@juancarlospaco
Copy link
Collaborator

#11529 (comment)

@ghost
Copy link

ghost commented Apr 2, 2020

@juancarlospaco this PR doesn't remove tinyc unlike yours, it moves tinyc to an external repository and you still will be able to fetch tinyc with koch

const nimRoot = currentSourcePath.parentDir.parentDir
const tinycRoot = nimRoot / tinyPrefix
when not dirExists(tinycRoot):
static: doAssert false, $(tinycRoot, "requires: ./koch installdeps tinyc")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

what's the advantage concretely ?

@timotheecour timotheecour marked this pull request as ready for review April 3, 2020 00:02
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.

3 participants