Git Product home page Git Product logo

Comments (7)

ysbaddaden avatar ysbaddaden commented on May 23, 2024 1

I've started thinking about the registry design. I think I'd like something between bower and rubygems. I mean to keep the metadata and let the actual code live in their GIT repositories — of alternative SCM.

The metadata being the shard.yml data (name, repository URL, dependencies, authors and license) for each available version.

Also maybe add webhooks to the repositories, so pushing a new tag would have the registry update itself. That would be nice.

from shards.

asterite avatar asterite commented on May 23, 2024

With @waj we were thinking how to have a decentralized approach by maybe leaving a shard's metadata in a special branch in the repository. That metadata would contain a special shard.yml (or another bigger file) that contains dependency information for all versions up to the last one, like what Rubygems has. Because it would be in a separate branch, checking it out should be fast so we wouldn't need to checkout each tag to know the dependencies to resolve conflicts.

The language/compiler could be aware of this and have commands to push new versions by creating tags in the repo and updating the special branch metadata.

from shards.

asterite avatar asterite commented on May 23, 2024

As for @zamith's concern about a registry, maybe we can have the registry just be a website that scans GitHub/BitBucket for crystal-related projects that have that special branch with the version information, and cache that information. Then the compiler would allow you to search libraries and add them to your project.

(when I say "the compiler" it could be a related tool, but maybe it's simpler to just have one entry point, like "crystal search", "crystal install", etc.)

from shards.

ysbaddaden avatar ysbaddaden commented on May 23, 2024

git show v0.1.0:shard.yml cats a file for the given refs. This is quick, yet still requires an up-to-date local mirror/clone of the repository (I don't think it applies on remote repositories).

from shards.

zamith avatar zamith commented on May 23, 2024

The problem with searching GitHub is that it only searches for projects in which the main language is Crystal. So, if you have a shard that has more of another language, it won't show up.

from shards.

ysbaddaden avatar ysbaddaden commented on May 23, 2024

Note that a registry + decentralized aren't mutually exclusive.

Some operations like search or info will require the registry, while some operations like install or update could take advantage of the registry (or not) and fallback to clone repositories and extract the metadata from it. To install the dependencies we'll most certainly have to clone the repositories anyway.

from shards.

zamith avatar zamith commented on May 23, 2024

I like @ysbaddaden idea of the hybrid registry.

from shards.

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.