Code Monkey home page Code Monkey logo

zim's People

Contributors

curtis-fugue avatar curtis-snyk avatar jason-fugue avatar jaspervdj-luminal avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zim's Issues

Comments do not work in multiline bash commands

It seems like this case is not handled correctly:

name: helloworld
rules:
  build:
    inputs:
    - "hello.c"
    outputs:
    - ${NAME}
    command: |
      gcc hello.c
      # Move the thing.
      mv a.out ${OUTPUT}

The last line is not executed.

Feature Request: Native run built-in command

nativerun

Runs a single command natively. Suggested syntax:

commands:
  - nativerun [command]

This is similar in spirit to native: true but would allow you to run single commands non-natively, rather than just single rules.

Feature Request: Allow for open-ended, long running requests

This request may be out-of-scope for Zim, but wanted to open the discussion anyways:

There are many cases where a live-reloading build is useful for development, but Zim seems to be more catered to producing build artifacts.

  1. Would it be possible to have Zim run a process that never completes?
  2. Would it be possible for Zim to spawn multiple additional shells to create live-reloads on dependencies?

Ways this might work

rules:
  build_livereload:
    leave_open: true
    native: true
    commands:
      - run: yarn && yarn start

  build_livereload_all:
    leave_open: true
    requires:
      - component: dependency
        rule: build_livereload
      - rule: build_livereload  

Feature Request: Move/Copy built-in commands

copy

Copies files/directories using cp. Suggested syntax:

commands:
- copy
    src: [src]
    dest: [dest]

move

Moves files/directories using mv. Suggested syntax:

commands:
- move
    src: [src]
    dest: [dest]

Feature Request: Unzip/unarchive (possibly conditional)

Unzip/unarchive

Unzips or unarchives the tar/zip created by zip or archive. Suggested syntax:

commands
  - unzip
      input:
      output:

Possible option to do this conditionally, which would help out a lot for the "this folder needs to exist to build" use-cases:

commands
  - unarchive
      condition: ! -d "node_modules"
      input: ../../artifacts/${NAME}.node_modules.tgz
      output: .

Feature Request: Don't error if input file not found

If I have a list of inputs, and one of those inputs is not found, I'd like the rule to still run. The absence of that input should be treated as part of the cache key.

Use case: I'd like to use the same template for multiple components, but not all of those components have all of the files listed under inputs.

Feature Request: ROOT environment variable

ROOT

The root directory (where artifacts lives). Useful to avoid having to do ../../artifacts, etc, could just do ${ROOT}/artifacts. ARTIFACTS_DIR could also work? This will come into particular use since I'm intending on nesting packages, ie src/viz_packages/viz_renderer/component.yaml and I'd like to avoid ../../../artifacts, especially since that'll break if I later move them. Example rules where this would be useful:

Before

rules
  dist:
    requires:
      - rule: build
    native: true
    command: |
      if [ ! -d "dist" ]; then tar -zxf ../../artifacts/${NAME}.tgz; fi

  clean:
    commands:
      - remove: dist
      - remove: ../../artifacts/${NAME}.tgz
      - remove: node_modules
      - remove: ../../artifacts/${NAME}.node_modules.tgz
rules
  dist:
    requires:
      - rule: build
    native: true
    command: |
      if [ ! -d "dist" ]; then tar -zxf ${ROOT}/artifacts/${NAME}.tgz; fi

  clean:
    commands:
      - remove: dist
      - remove: ${ROOT}/artifacts/${NAME}.tgz
      - remove: node_modules
      - remove: ${ROOT}/artifacts/${NAME}.node_modules.tgz

Feature Request: Allow setting a minimum required concurrency for rules

For rules that are intended to spawn multiple open-ended processes (such as live-reloading rules), a certain level of concurrency is required, or they will break. Allow us to set a required_concurrency parameter on a rule? Behavior could either be that it fails with a message if the zim config jobs setting or the -j flag is too low, or just bump it up to that number for that rule.

Alternative option is to just have a live: true flag on rules that, when set, will automatically spawn that rule in its own process. This live: true flag could maybe also turn on --output unbuffered for that rule?

feature request: Local directory cache

As far as i can tell from reading source/documentation zim currently only supports caching via S3.

Would you consider adding a local directory cache, which would allow for a very low friction setup for enabling caching in various environments.

It should be such that the full cache should be able to be exported/imported out of band, and thus be able to be loaded/saved from disk.

Immediate usage would be for using it with the default GitHub action cache pointed to by a simple directory path.

Thanks in advance ๐Ÿ™

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.