Coder Social home page Coder Social logo

flutter-build-runner-action's Introduction

flutter-build-runner-action

Runs the Flutter / Dart Build Runner and caches the results so subsequent runs are faster.

Usage

steps:
  - name: Flutter Build Runner
    uses: vhanda/flutter-build-runner-action@v1
    with:
      output_paths: |
        lib/generated/
        lib/**/*.g.dart

The cache key is based on the sha1 commit hash. This means that the cache will only be shared among different jobs for the same commit.

Sharing Caches Between Commits

tldr: Not worth it

Most build_runners operate by reading all the dart files. We could potentially avoid regenerating the built files by only monitoring those files, but I would prefer the default behavior to always just work. There will be edge cases of people getting stuck because of runners which operate on non-dart files. I've experimented with allowing a custom glob pattern for when the cache should be rebuilt, but one would have to remember to update it.

This all seems ripe for possible error cases, for very little gain. Cache invalidation is supposed to be one of those hard computer science problems.

Additionally build_runners doesn't provide a way for runners to output exactly what files they are interested in. Just glob patterns. I've looked into the code, and changing this behavior is going to be a lot of work, for very little gain.

flutter-build-runner-action's People

Contributors

vhanda avatar

Watchers

 avatar

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.