Code Monkey home page Code Monkey logo

bindown's People

Contributors

dependabot[bot] avatar willabides avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

rubiojr tfmv

bindown's Issues

Registry

Hey @WillAbides

in https://github.com/WillAbides/bindown-templates/blob/main/bindown.yml the properties and the sources of the remote binary are conflated together .

maybe a registry is needed at a global level per machine ? Then things are DRY and extensible without getting too crazy . There is a balance.

The global registry can be a git server.

I am using nats Jetstream to keep all global and remote registries up to date so we could use that with bindown if your up for it. I could also write it as a plugin off otherwise.

It would mean that a binary or a registry value would be streamed to all laptops or servers instantly . So then as a user you know of it’s existence without the pull / push cycles. It’s all real time .

Improve init

Improve bindown init to:

  1. Add cache and install_dir to .bindown.yaml if they are set to non-default.

  2. Add cache and install_dir directories to .gitignore.

Need to add an --install-dir param to init. It can use the global --cache option param for setting the cache dir. It
also needs a --no-gitignore param to prevent it.

The .gitignore file should be in the same directory as .bindown.yaml even if it is in a subdirectory of the git
repo.

The algorithm for .gitignore should be something like:

  1. If git isn't available in PATH, abort
  2. If .bindown.yaml isn't being created inside a git repo, abort
  3. For each directory of cache and install_dir
    1. Use git check-ignore to see if the directory is already ignored. If so continue to next directory.
    2. Append the directory to .gitignore in the same directory as .bindown.yaml

Handle microarchitectures

Make it simpler to handle micro-architectures so that the same dependency can target multiple microarchitectures for the same arch. For instance both binname-linux-armv5 and binname-linux-armv6.

Considerations

Systems

Currently a system is "os/arch". I think we will need to expand this to "os/arch[/microarch]" with unspecified microarch defaulting to go's default when unspecified. So linux/arm/v5 will download binname-linux-armv5 while both linux/arm and linux/arm/v6 will download binname-linux-armv6.

Multiple types of microarchitecture.

Go defines microarchitecture with different variables depending on the GOARCH. Those vars are currently:

var arches values default
GO386 386 softfloat, sse2 sse2
GOARM arm 5, 6, 7 6
GOAMD64 amd64 v1, v2, v3, v4 v1
GOMIPS mips, mipsle hardfloat, softfloat hardfloat
GOPPC64 ppc64 power8, power9 power8

Because no arch has more than one var, we may be able to have one template var for all archs. Something like {{ .microArch }}. We should also populate {{ .go386 }}, {{ .goarm }}, etc.

This assumes there will never by a single GOARCH that can have multiple microarchs. I think that's a safe assumption. If this changes, we may need to make a breaking change.

add-by-*

No more details...just need to remember to consider dependency add-by-urls and dependency add-by-github-release.

windows

Anyone tried this on windows ? just wondering if it works there too.

"bin" is ignored

Starting in v4.8.0, the "bin" config is ignored when installing.

Version config files

bindown needs a way to determine which bindown versions a config file will work with.

This will come up in #161 because adding {{ .microArch }} to a template will cause earlier bindown versions to error.

This won't be a big deal for individual repositories because you can simply not add features before you start using a version of bindown that handles them. However template repositories like https://github.com/WillAbides/bindown-templates should be able to signal that they don't support older versions of bindown.

Options

bindown_version

Add something like bindown_version: '>= 4.3.0' to the config and fail with a message to upgrade when reading a config file from a version of bindown that doesn't meet the constraint.

I think this will work for non-breaking changes like #161 where new functionality is added, but this doesn't work when something is removed.

It would also be difficult to figure out what value to use for bindown_version when writing a config file.

config_version

Similar to api_version but it's about config files instead.

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.