Skip to content

d4rkr00t/evo

Repository files navigation

/*
 * ┌────────────┐   ┌────────────┐       ┌─────────────────────────┐
 * │            │   │            │       │                         │
 * │ evo config ├──►│ workspaces ├──────►│                         │
 * │            │   │            │       │         labels          │
 * └─────────┬──┘   └────────────┘       │                         │
 *           │                           │    workspace::target    │
 *           │      ┌────────────┐       │        ::target         │
 *           │      │            │       │                         │
 *           └─────►│ targets    ├──────►│                         │
 *                  │            │       │                         │
 *                  └────────────┘       └─────────────────────────┘
 */

TODO

  • FileSystem <- 🦄
    • Cache file check-sums
    • Update file check sums only when modified time is after previous update
    • Watch file changes during task run
      • Update FileSystem cache only when a file changes
  • Cache improvements
    • Put single target's cache in 1 folder instead of spreading it across multiple locations
    • Custom Hash Input for e.g. environment, etc...
    • Remote cache (MVP)
    • Cache rotation – e.g. evo clear-cache clears stale cache
    • evo clear-cache <label>
    • evo clear-output <label> – clears all outputs from packages
  • Validate missing target dependencies
  • Workspace tags
    • Add rules to define what tags can depend on what tags, e.g. library and app, app can depend on a library but not the other way around
  • Private targets – Only can be run as a dependency of another target in the same workspace
  • Filter target inputs, apply globs to workspace files, depends on ((FileSystem))
  • Should manage toolchain (?)
  • Support sub workspaces (?)
    • Pros / Cons
    • Automatic ignores from top level
  • Fix linking peer dependencies (?)
  • Watch mode
  • Evo status
    • Show some stats info about the repo
  • Reporter
    • Spinner disappears
    • Useless when a lot of tasks
      • Show only top level and failed. In spinner report progress with – succeeded (+from cache) / failed (+from cache)
    • On error need to report status – succeeded (+from cache) / failed (+from cache)
    • Move reporter locking into a separate go routine
  • Website
    • Documentation
  • Cache debugging
    • Centered around tasks
    • Shows what task deps have changed
    • Shows what external workspace deps have changed
    • Shows if workspace files have changed
    • Shows everything that is included in building a cache
    • Shows if command changed
  • Refactor
    • Upgrade Go
    • Split code in packages
    • Generics -> Go 1.8
    • REFACTOR: create tasks from workspaces
    • REFACTOR: Generic create task from a rule
    • REFACTOR: Refactor cache to interfaces
    • REFACTOR: Refactor logger
      • to generics/interfaces
      • Cleaner API
      • Add debug level to the logger
  • Add .env support
  • Watchman integration and persistent graph
  • SANDBOXING !!!
  • Targets
    • check that command exist
    • check all required fields
      • provide schema (?)
  • Different info
    • Show what's included in hash for a target – evo show-hash pkg-a::target
    • Show all rules for a WS with overrides – evo show-rules pkg-a
    • Why a target is affected – evo why pkg-a::build
  • More commands
    • evo show-scope <package> – show what packages are in scope
    • evo import
      • makes sure that all dependencies are on expected versions
      • makes sure that all dependencies are lifted to the top level package.json
  • Use .gitignore in addition to include/exclude in evo config
  • Generators / Templates
    • Generate a project from pnpm/yarn workspace and npm scripts
  • Use semver comparison for dependencies (?)
  • Task Shell Like commands:
  • https://github.com/karrick/godirwalk
  • https://github.com/sabhiram/go-gitignore (?)
  • Support target deps: ["package::sometarget"]
  • Support file deps: ["file::somefilepath"]
  • Linker: error when duplicate/overriding bins
  • Support project tasks, e.g. run pnpm install for the whole project ((Support file deps))

DONE

  • Rewrite show-affected to use :: syntax for targets and workspaces
  • Task references workspace directly instead of WsName, WsPath, etc...
  • Only care about tasks, workspaces are just meta information and a part of inputs
  • Stop swallowing stderr or stdout in case of an error
  • Migrate to workspace::target convention
    • evo run ::build
    • evo run workspace::build
  • CI should use already published @evobuild/cli package
  • Fix GOCCM with empty queue
  • Profile long workspaces discovery
  • Put overrides to file system
  • Re-design CLI output
  • Fix error reporting
  • Cache diagnostics
    • List of files that were used to create hash
    • Diff to show what affected cache
  • Fix all issues highlighted by --race flag
  • Stop swallowing errors at cmd execution time
  • Extract evo config to a separate file to avoid cache misses for package managers
  • evo run to show a list of available commands
  • Support empty commands
  • CI Publishing
  • Add --since flag for CI
  • Add --version command
  • CI
    • Publishing to NPM
    • Test in PRs
    • Use evo to manage evo
  • Use sync.Map for stats
  • Tasks Map similar to Workspace Map
    • Use sync.Map
  • REFACTOR: Workspaces map to use the DAG library
  • Fix that – Didn't produce outputs still caches and doesn't fail next time
  • Cache Improvements
    • Tasks cache should only depend on the cache of the outputs of its dependencies
    • Tasks cache should not depend on other tasks in the workspace
  • Support yarn
  • Support npm
  • Validations
    • Validate external dependencies
    • Validate dep cycles
    • Duplicate WS
    • Validate task cycles
  • https://github.com/google/chrometracing
  • Fix race condition in task runner
  • Add random colors for badges
  • https://github.com/zenthangplus/goccm
  • Limit concurrency setting
  • Investigate rebuild cache miss
  • REFACTOR: Task runner
  • https://github.com/deckarep/golang-set
  • https://github.com/pyr-sh/dag
  • Pretty print duration
  • Detect scope from cwd
  • Scoped runs – evo run build pkg-a
  • Add dependency install and linking
    • Cache project state
    • Install packages
    • Check if node_modules folder exists
    • Link packages
    • Link dev dependencies
    • Link binaries
  • Clean task outputs before task run
  • Simple Test infra
  • Throw an error when not in an EVO project
  • Fail when not in evo project
  • Cache only outputs of the target
  • Get rid of cacheOutputs
  • Pre-hash workspace
  • Rule outputs
  • Skip WS if target doesn't exist
  • Running multiple targets evo run build test lint
  • Non-zero exit code when had failing tasks
  • FileSystem module
    • In memory cache of file checksums, update only when update time of a file changed
      • Preserve cache on disk
    • Add / remove files from cache
    • Error handling
  • Replace build with run
  • Add configuration
    • Namespace config
  • Move more caching logic to a task
    • Cache tasks with a task name prefix
  • Add logging and progress
  • Build stats
  • REFACTOR: Get rid of runner and project in favor of context
    • Remove runner struct
    • Remove project struct
    • Split Run function into stages
    • Create task runner
  • Proper dependency tracking for deciding when WS is updated
    • Cache WS state
    • Use WS_files_hash + dependencies_hash as a WS_hash
    • Use WS states to build dependencies cache
  • Rebuild affected by a rule change
    • Use a hash of all rules that apply to a WS
    • Move preprocessed rules to WS
  • Add reusable command definition to a config – should be able to run a command defined in a config in multiple rules like @typescript <params>
  • Store STDOUT + STDERR of a command and replay output
  • Rename to "evo" from "evoke"
  • Throw an error when pnpm errors
  • Throw if target doesn't exist
  • Stricter overrides
    • Replace glob with a relative path to a group or a certain package
  • Simple Error handling
    • Task execution
    • Task dependencies
  • Cache tasks afterwards
    • Re-hash once per WS
    • Top sort tasks
  • Race condition leads to cache pollution
  • Workspaces struct
    • Store all WS
    • Store all updated WS
    • Store all affected WS
  • Replace task runner output with a spinner
  • Accumulate errors and print them at the end
  • Local dev loop