Comments (7)
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.
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.
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.
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.
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.
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.
I like @ysbaddaden idea of the hybrid registry.
from shards.
Related Issues (20)
- Concurrent installs fail with "Failed to clone" HOT 1
- shards build --mcpu causes lookup of CPU arch as a target incorrectly HOT 3
- Add Pijul resolver HOT 2
- [Website] Could statistics be added? HOT 2
- Windows: A required privilege is not held by the client HOT 3
- Shards installs wrong version of lucky HOT 6
- branch master not satisfy condition >= HOT 5
- Tell why upgrading more
- Inconsistency in `~> x.y.z` requirement with pre-release HOT 1
- Unable to resolve dependency with pre-release version HOT 5
- Refactor resolver code
- `shards remove` command
- Prune command fails to remove symlink HOT 1
- Notify users of deprecated/outdated package HOT 8
- Different behavior between `shards run` and `crystal run` HOT 3
- Installed version in `lib` does not match version in `shard.lock` HOT 3
- verbose option should output also out and err from postinstall script
- `--local` flag doesn't respect CRYSTAL_PATH HOT 3
- FR: Option for out-of-source builds HOT 4
- Equivalent of "go mod vendor"? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shards.