Git Product home page Git Product logo

Comments (10)

euantorano avatar euantorano commented on August 28, 2024

Note that a repository could have a different name to the main nimble file.

For example, take my repository euantorano/sever.nim where the .nimble file name is actually semver.nimble.

I believe that the eventual plan was for the nimble directory to actually be the package source, rather than a large JSON file stored on GitHub. In that cause, authors would be submitting packages and we could probably ask them to provide the path to the .nimble file on submission.

from nim-package-directory.

GULPF avatar GULPF commented on August 28, 2024

Note that .nimble files are not declarative, so extracting the version from them is not that simple. See e.g nimbles .nimble file, where the version number is imported from another module.

from nim-package-directory.

coocheenin avatar coocheenin commented on August 28, 2024

@euantorano Ok, but which purpose for naming like so?
(repo and package with different names)

And by the way, your repo has no releases yet.
Attempt to request curl -i https://api.github.com/repos/euantorano/semver.nim/releases/latest will raise 404.

from nim-package-directory.

coocheenin avatar coocheenin commented on August 28, 2024

Note that .nimble files are not declarative, so extracting the version from them is not that simple. See e.g nimbles .nimble file, where the version number is imported from another module.

Yes, right. But I suggest a solution (in example) for cases where there is no real release (only tagged automatic release). I don't see in sources extracting the tag version (only release extracting request). And sadly, we can't assume that the tags are in chronological order.
[I've updated issue.]

from nim-package-directory.

euantorano avatar euantorano commented on August 28, 2024

@coocheenin Yes, because Nimble doesn't actuallly use GitHub releases when it does version resolution itself - it always looks at the .nimble file for the package. It decides upon this file's name based upon the name of the project in the package repository JSON. THis has caused me some ehadache in the past wehn I've remembered to tag a release but not update the nimble file.

Regarding why I have a different name for the repository and the project, most of my Nim projects have a name ending in .nim to allow me to easily filter them.

from nim-package-directory.

coocheenin avatar coocheenin commented on August 28, 2024

@euantorano I've understand. The only open question: Does it make sense to add code, typed above, to fetch_github_versions as I've described in issue's [UPDATE] section.

from nim-package-directory.

euantorano avatar euantorano commented on August 28, 2024

from nim-package-directory.

coocheenin avatar coocheenin commented on August 28, 2024

Yes, it definitely needs improving in some way. I’m not sure what the best option is personally.

@euantorano Can I make a PR then? With additional check whether the target a number is (to avoid situation described by @GULPF).

from nim-package-directory.

coocheenin avatar coocheenin commented on August 28, 2024

I did it in async style, with additional isDigit() check: 368b89f
But i have no idea about:

ci/circleci Expected — Waiting for status to be reported

from nim-package-directory.

FedericoCeratto avatar FedericoCeratto commented on August 28, 2024

GitHub's API does not provide the latest version anymore and it was also providing it based on date rather than a semantic on version numbers.
Fixed in f2f23d2 - now we are sorting GH tags semantically.

from nim-package-directory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.