GithubHelp home page GithubHelp logo

jakegut / yabs Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 794 KB

[y]et [a]nother [b]uild [s]ystem

Home Page: https://yabs.build

License: Apache License 2.0

Go 100.00%
build build-system build-tool go golang

yabs's Introduction

yabs

GitHub Workflow Status Apache-2.0 license Go Report Card Releases

[y]et [a]nother [b]uild [s]ystem

a build system, configurable in risor, a go-like scripting language

Installation

go install github.com/jakegut/yabs/cmd/yabs@latest

Usage

Make a build.yb file at the root of your project with the logic for your builds

register('hello', [], func(bc) {
    sh("echo 'hello world!'")
})
> yabs hello
2023/08/11 20:22:12 running "hello"
hello world!

View examples

yabs's People

Contributors

jakegut avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

myzie

yabs's Issues

Refactor

Refactor some stuff:

  • Split into more granular packages
    • tasks
    • rules
    • eval/risor stuff
    • runconfig
  • Add tests for above + toolchain
  • Add test cov target
  • Add some comments for pkg.go.dev

Run targets across different folders

This one is a bit tricky.

If I have a target build in the docs/build.yb file, then the target name will be docs/build.

What's tricky is that we have to evaluate all of the targets across all build scripts in order for them to be saved on the next run

  • We add a way to transfer tasks across sessions even if they weren't registered
  • We add a way to have per-folder sets of targets that don't interact with other targets, each folder will get their own set of task records
    • It might be annoying having to recreate toolchains, but they should be able to pick up on previously downloaded toolchains

We'll also need a way to determine the root of the project, and if we should support relative yabs invocations, for instance: invoking yabs build in the docs/ directory will invoke yabs docs/build.

We'll also need to support changing directories. Running a target in docs/build.yb should change the working directory to docs

We'll also need to support loading custom modules if they're in the different directories, but that may be for another issue.

Add configuration

yabs.toml at root of project, run yabs from anywhere and find the yabs.toml to find the project root

Configure things like:

  • Go toolchain cache loc
  • Any other things??

Ship a Go toolchain

Ship a yabs binary that is able to take the build config file, build it and run it all from a toolchain that doesn't rely on the host.

  1. Inconsistent Go versions could lead to slightly different builds, unsure if this is a problem
  2. Host doesn't need Go installed

yabs and the accompanying go toolchain would essentially be gvm and should handle things like the dep and build cache, that can be stored in a user specified folder or in the .yabs cache for CI

Add watch option

Add a --watch option that can watch on file changes and rebuild the current executing target if any file dependencies change

Add a module manager

Add the ability to configure modules that will be added to the risor environment. Support internal and external modules

Rebuild on dependency changes

  • Whenever a list of dependencies change, we should rebuild no matter what
graph TD
   B[B - cached] --> C
   A[A - cached] --> C
   D[D - cached]

When D is added as a dep then it wouldn't be run since it would've been cached

Run targets for already chached deps if not already run

graph TD
   go_files --> build
   go_files --> build_all

If build is run in one session and build_all in the next. build_all will not be rebuilt since no changes were detected in go_files for that session.

Add a way to intuitively check if a dependency was cached, but the target itself has not run with that dependency

Seeminly rare "concurrent map write" panic

./bin/yabs release
2023/08/21 20:27:59 running "go_files"
2023/08/21 20:27:59 running "[email protected]"
2023/08/21 20:27:59 already have [email protected]
2023/08/21 20:27:59 running "version"
2023/08/21 20:28:00 no actions for "go_download"
2023/08/21 20:28:00 running "yabs_windows_amd64"
2023/08/21 20:28:00 running "yabs_darwin_amd64"
2023/08/21 20:28:00 running "yabs_linux_arm64"
2023/08/21 20:28:00 running "yabs_darwin_arm64"
2023/08/21 20:28:00 running "yabs_linux_amd64"
fatal error: concurrent map writes

goroutine 35 [running]:
github.com/risor-io/risor/object.(*SymbolTable).Lookup(0xc0000c0640, {0xc0004c8090, 0x6})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/object/symbol_table.go:146 +0x77
github.com/risor-io/risor/object.(*Module).GetAttr(0xc0000368c0, {0xc0004c8090?, 0x0?})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/object/module.go:29 +0xac
github.com/risor-io/risor/vm.(*VirtualMachine).eval(0xc0006f2000, {0xbed368?, 0xc00037e0c0?})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:152 +0xebf
github.com/risor-io/risor/vm.(*VirtualMachine).loadModule(0xc0006f2000, {0xbed368, 0xc00037e0c0}, {0xc00003aa30, 0x2})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:511 +0x465
github.com/risor-io/risor/vm.(*VirtualMachine).eval(0xc0006f2000, {0xbed368?, 0xc00037e0c0?})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:420 +0xc69
github.com/risor-io/risor/vm.(*VirtualMachine).Run(0xc0006f2000, {0xbed368, 0xc0002ee5d0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:114 +0x565
main.registerFunc.func1.1({{0xc00019a0c0, 0x36}, 0xc000198150})
        /home/jake/projects/yabs/cmd/yabs/eval.go:169 +0x113
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e55e0)
        /home/jake/projects/yabs/scheduler.go:64 +0x4ef
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 1 [chan receive]:
github.com/jakegut/yabs.(*Yabs).ExecWithDefault(0xc0000c2700, {0x7ffc89dfebd6, 0x7})
        /home/jake/projects/yabs/yabs.go:261 +0xae
main.main.func2(0xc00036edc0)
        /home/jake/projects/yabs/cmd/yabs/main.go:121 +0x195
github.com/urfave/cli/v2.(*Command).Run(0xc0003882c0, 0xc00036edc0, {0xc000036040, 0x2, 0x2})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:274 +0x9eb
github.com/urfave/cli/v2.(*App).RunContext(0xc000386000, {0xbed2f8?, 0xc00003a0b0}, {0xc000036040, 0x2, 0x2})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:332 +0x616
github.com/urfave/cli/v2.(*App).Run(...)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:309
main.main()
        /home/jake/projects/yabs/cmd/yabs/main.go:130 +0x5b8

goroutine 4 [chan receive (nil chan)]:
github.com/risor-io/risor/vm.(*VirtualMachine).Run.func2()
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:102 +0x35
created by github.com/risor-io/risor/vm.(*VirtualMachine).Run
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:101 +0x12a

goroutine 5 [chan receive]:
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc000380150)
        /home/jake/projects/yabs/scheduler.go:49 +0x334
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 7 [chan receive]:
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e56c0)
        /home/jake/projects/yabs/scheduler.go:49 +0x334
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 8 [chan receive]:
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e59d0)
        /home/jake/projects/yabs/scheduler.go:49 +0x334
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 9 [chan receive]:
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e5ce0)
        /home/jake/projects/yabs/scheduler.go:49 +0x334
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 10 [chan receive]:
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc000380000)
        /home/jake/projects/yabs/scheduler.go:49 +0x334
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 11 [chan receive]:
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e50a0)
        /home/jake/projects/yabs/scheduler.go:49 +0x334
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 12 [chan receive]:
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e53b0)
        /home/jake/projects/yabs/scheduler.go:49 +0x334
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 13 [select]:
golang.org/x/sync/semaphore.(*Weighted).Acquire(0xc0002f09b0, {0xbed2f8, 0xc00003a0b0}, 0x1)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/golang.org/x/[email protected]/semaphore/semaphore.go:60 +0x34d
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e52d0)
        /home/jake/projects/yabs/scheduler.go:60 +0x42c
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 21 [chan receive (nil chan)]:
github.com/risor-io/risor/vm.(*VirtualMachine).Run.func2()
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:102 +0x35
created by github.com/risor-io/risor/vm.(*VirtualMachine).Run
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:101 +0x12a

goroutine 73 [chan receive (nil chan)]:
github.com/risor-io/risor/vm.(*VirtualMachine).Run.func2()
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:102 +0x35
created by github.com/risor-io/risor/vm.(*VirtualMachine).Run
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:101 +0x12a

goroutine 34 [runnable]:
github.com/risor-io/risor/parser.(*Parser).registerInfix(...)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:231
github.com/risor-io/risor/parser.New(0xc0005ba480, {0x0, 0x0, 0x0?})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:161 +0x1c85
github.com/risor-io/risor/parser.Parse({0xbed368, 0xc00037f4a0}, {0xc00034bba8?, 0x2?}, {0x0, 0x0, 0x0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:30 +0x65
github.com/risor-io/risor/parser.(*Parser).parseString(0xc000194000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:979 +0x3a5
github.com/risor-io/risor/parser.(*Parser).parseNode(0xc000194000, 0x1)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:481 +0xd2
github.com/risor-io/risor/parser.(*Parser).parseExpression(0xc000194000, 0x416d1a?)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:501 +0x36
github.com/risor-io/risor/parser.(*Parser).parseAssignmentValue(0xc000194000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:371 +0x3b
github.com/risor-io/risor/parser.(*Parser).parseDeclaration(0xc000194000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:342 +0x3a5
github.com/risor-io/risor/parser.(*Parser).parseStatement(0xc000194000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:294 +0x15d
github.com/risor-io/risor/parser.(*Parser).parseBlock(0xc000194000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:889 +0x138
github.com/risor-io/risor/parser.(*Parser).parseFunc(0xc000194000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:917 +0x205
github.com/risor-io/risor/parser.(*Parser).parseNode(0xc000194000, 0x1)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:481 +0xd2
github.com/risor-io/risor/parser.(*Parser).parseExpressionStatement(0xc000194000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:456 +0x3b
github.com/risor-io/risor/parser.(*Parser).parseStatement(0xc000194000?)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:298 +0x1cc
github.com/risor-io/risor/parser.(*Parser).Parse(0xc000194000, {0xbed368?, 0xc00037f4a0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:213 +0x11d
github.com/risor-io/risor/parser.Parse({0xbed368, 0xc00037f4a0}, {0xc000016700?, 0x2?}, {0x0, 0x0, 0x0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:35 +0xb4
github.com/risor-io/risor/importer.(*LocalImporter).Import(0xc0004fa080, {0xbed368, 0xc00037f4a0}, {0xc00003aa30, 0x2})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/importer/importer.go:61 +0x135
github.com/risor-io/risor/vm.(*VirtualMachine).loadModule(0xc000772000, {0xbed368, 0xc00037f4a0}, {0xc00003aa30, 0x2})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:494 +0x96
github.com/risor-io/risor/vm.(*VirtualMachine).eval(0xc000772000, {0xbed368?, 0xc00037f4a0?})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:420 +0xc69
github.com/risor-io/risor/vm.(*VirtualMachine).Run(0xc000772000, {0xbed368, 0xc0002ee5d0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:114 +0x565
main.registerFunc.func1.1({{0xc00019a040, 0x36}, 0xc000198090})
        /home/jake/projects/yabs/cmd/yabs/eval.go:169 +0x113
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e58f0)
        /home/jake/projects/yabs/scheduler.go:64 +0x4ef
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 20 [semacquire]:
strings.(*Builder).grow(...)
        /home/jake/projects/yabs/.yabs/go/go1.20.7/go/src/strings/builder.go:68
strings.(*Builder).Grow(...)
        /home/jake/projects/yabs/.yabs/go/go1.20.7/go/src/strings/builder.go:82
strings.Join({0xc000558200, 0x6e?, 0x20}, {0x0, 0xa177c0?})
        /home/jake/projects/yabs/.yabs/go/go1.20.7/go/src/strings/strings.go:440 +0x125
github.com/risor-io/risor/lexer.(*Lexer).readString(0xc000118000, 0x27)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/lexer/lexer.go:513 +0x258
github.com/risor-io/risor/lexer.(*Lexer).Next(0xc000118000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/lexer/lexer.go:247 +0x1b85
github.com/risor-io/risor/parser.(*Parser).nextToken(0xc00011a000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:179 +0x11f
github.com/risor-io/risor/parser.(*Parser).parseMapOrSet(0xc00011a000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:1266 +0xc3d
github.com/risor-io/risor/parser.(*Parser).parseNode(0xc00011a000, 0x1)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:481 +0xd2
github.com/risor-io/risor/parser.(*Parser).parseExpression(0xc00011a000, 0xb098d3?)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:501 +0x36
github.com/risor-io/risor/parser.(*Parser).parseKeyValue(0xc00011a000?)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:1335 +0x85
github.com/risor-io/risor/parser.(*Parser).parseMapOrSet(0xc00011a000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:1273 +0x9cd
github.com/risor-io/risor/parser.(*Parser).parseNode(0xc00011a000, 0x1)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:481 +0xd2
github.com/risor-io/risor/parser.(*Parser).parseNodeList(0xc00011a000, {0xbe1910, 0x1})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:1091 +0x385
github.com/risor-io/risor/parser.(*Parser).parseCall(0xc00011a000, {0xbed758?, 0xc000540140?})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:1170 +0xa9
github.com/risor-io/risor/parser.(*Parser).parseNode(0xc00011a000, 0x1)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:491 +0x2c6
github.com/risor-io/risor/parser.(*Parser).parseExpression(0xc00011a000, 0x416d1a?)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:501 +0x36
github.com/risor-io/risor/parser.(*Parser).parseAssignmentValue(0xc00011a000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:371 +0x3b
github.com/risor-io/risor/parser.(*Parser).parseDeclaration(0xc00011a000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:342 +0x3a5
github.com/risor-io/risor/parser.(*Parser).parseStatement(0xc00011a000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:294 +0x15d
github.com/risor-io/risor/parser.(*Parser).parseBlock(0xc00011a000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:889 +0x138
github.com/risor-io/risor/parser.(*Parser).parseFunc(0xc00011a000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:917 +0x205
github.com/risor-io/risor/parser.(*Parser).parseNode(0xc00011a000, 0x1)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:481 +0xd2
github.com/risor-io/risor/parser.(*Parser).parseExpressionStatement(0xc00011a000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:456 +0x3b
github.com/risor-io/risor/parser.(*Parser).parseStatement(0xc00011a000?)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:298 +0x1cc
github.com/risor-io/risor/parser.(*Parser).Parse(0xc00011a000, {0xbed368?, 0xc0002e80c0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:213 +0x11d
github.com/risor-io/risor/parser.Parse({0xbed368, 0xc0002e80c0}, {0xc0002c0e00?, 0x2?}, {0x0, 0x0, 0x0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:35 +0xb4
github.com/risor-io/risor/importer.(*LocalImporter).Import(0xc000294000, {0xbed368, 0xc0002e80c0}, {0xc00003aa30, 0x2})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/importer/importer.go:61 +0x135
github.com/risor-io/risor/vm.(*VirtualMachine).loadModule(0xc00012c000, {0xbed368, 0xc0002e80c0}, {0xc00003aa30, 0x2})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:494 +0x96
github.com/risor-io/risor/vm.(*VirtualMachine).eval(0xc00012c000, {0xbed368?, 0xc0002e80c0?})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:420 +0xc69
github.com/risor-io/risor/vm.(*VirtualMachine).Run(0xc00012c000, {0xbed368, 0xc0002ee5d0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:114 +0x565
main.registerFunc.func1.1({{0xc000122040, 0x36}, 0xc000120090})
        /home/jake/projects/yabs/cmd/yabs/eval.go:169 +0x113
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e5f10)
        /home/jake/projects/yabs/scheduler.go:64 +0x4ef
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 36 [runnable]:
github.com/risor-io/risor/parser.New(0xc0004d5200, {0x0, 0x0, 0x0?})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:164 +0x1cb3
github.com/risor-io/risor/parser.Parse({0xbed368, 0xc000269cb0}, {0xc0004efa64?, 0x27?}, {0x0, 0x0, 0x0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:30 +0x65
github.com/risor-io/risor/parser.(*Parser).parseString(0xc0004e4000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:979 +0x3a5
github.com/risor-io/risor/parser.(*Parser).parseNode(0xc0004e4000, 0x1)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:481 +0xd2
github.com/risor-io/risor/parser.(*Parser).parseExpression(0xc0004e4000, 0x0?)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:501 +0x36
github.com/risor-io/risor/parser.(*Parser).parseAssignmentValue(0xc0004e4000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:371 +0x3b
github.com/risor-io/risor/parser.(*Parser).parseDeclaration(0xc0004e4000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:342 +0x3a5
github.com/risor-io/risor/parser.(*Parser).parseStatement(0xc0004e4000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:294 +0x15d
github.com/risor-io/risor/parser.(*Parser).parseBlock(0xc0004e4000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:889 +0x138
github.com/risor-io/risor/parser.(*Parser).parseFunc(0xc0004e4000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:917 +0x205
github.com/risor-io/risor/parser.(*Parser).parseNode(0xc0004e4000, 0x1)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:481 +0xd2
github.com/risor-io/risor/parser.(*Parser).parseExpressionStatement(0xc0004e4000)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:456 +0x3b
github.com/risor-io/risor/parser.(*Parser).parseStatement(0xc0004e4000?)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:298 +0x1cc
github.com/risor-io/risor/parser.(*Parser).Parse(0xc0004e4000, {0xbed368?, 0xc000269cb0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:213 +0x11d
github.com/risor-io/risor/parser.Parse({0xbed368, 0xc000269cb0}, {0xc0003f8e00?, 0x2?}, {0x0, 0x0, 0x0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/parser/parser.go:35 +0xb4
github.com/risor-io/risor/importer.(*LocalImporter).Import(0xc0005a2000, {0xbed368, 0xc000269cb0}, {0xc00003aa30, 0x2})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/importer/importer.go:61 +0x135
github.com/risor-io/risor/vm.(*VirtualMachine).loadModule(0xc000732000, {0xbed368, 0xc000269cb0}, {0xc00003aa30, 0x2})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:494 +0x96
github.com/risor-io/risor/vm.(*VirtualMachine).eval(0xc000732000, {0xbed368?, 0xc000269cb0?})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:420 +0xc69
github.com/risor-io/risor/vm.(*VirtualMachine).Run(0xc000732000, {0xbed368, 0xc0002ee5d0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:114 +0x565
main.registerFunc.func1.1({{0xc00019a140, 0x36}, 0xc000198210})
        /home/jake/projects/yabs/cmd/yabs/eval.go:169 +0x113
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e5c00)
        /home/jake/projects/yabs/scheduler.go:64 +0x4ef
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 37 [runnable]:
syscall.runtimeSetenv({0xb050cf, 0x7}, {0xc000280240, 0x2a})
        /home/jake/projects/yabs/.yabs/go/go1.20.7/go/src/runtime/runtime.go:93 +0x31
syscall.Setenv({0xb050cf, 0x7}, {0xc000280240, 0x2a})
        /home/jake/projects/yabs/.yabs/go/go1.20.7/go/src/syscall/env_unix.go:122 +0x354
os.Setenv({0xb050cf?, 0xc000036480?}, {0xc000280240?, 0x2?})
        /home/jake/projects/yabs/.yabs/go/go1.20.7/go/src/os/env.go:120 +0x27
github.com/jakegut/yabs/toolchain.Go(0xbf1b98?, {0xc00003aa98, 0x8})
        /home/jake/projects/yabs/toolchain/toolchain.go:36 +0x2a8
main.goTcFunc.func1({0xea55edd19715d5c2?, 0x0?}, {0xc0006ec020?, 0x44f0b2?, 0x410?})
        /home/jake/projects/yabs/cmd/yabs/eval.go:127 +0x4d
github.com/risor-io/risor/object.(*Builtin).Call(...)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/object/builtin.go:52
github.com/risor-io/risor/vm.(*VirtualMachine).call(0xc0006ae000, {0xbed368?, 0xc0002e9c80?}, {0xbf0f38?, 0xc000274500?}, 0x0?)
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:536 +0x99
github.com/risor-io/risor/vm.(*VirtualMachine).eval(0xc0006ae000, {0xbed368?, 0xc0002e9c80?})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:231 +0x35a7
github.com/risor-io/risor/vm.(*VirtualMachine).Run(0xc0006ae000, {0xbed368, 0xc0002ee5d0})
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:114 +0x565
main.registerFunc.func1.1({{0xc00019a200, 0x36}, 0xc000198330})
        /home/jake/projects/yabs/cmd/yabs/eval.go:169 +0x113
github.com/jakegut/yabs.(*Scheduler).execTask(0xc0000b5980, 0xc0002e4fc0)
        /home/jake/projects/yabs/scheduler.go:64 +0x4ef
created by github.com/jakegut/yabs.(*Scheduler).Schedule
        /home/jake/projects/yabs/scheduler.go:95 +0x2fd

goroutine 38 [chan receive (nil chan)]:
github.com/risor-io/risor/vm.(*VirtualMachine).Run.func2()
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:102 +0x35
created by github.com/risor-io/risor/vm.(*VirtualMachine).Run
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:101 +0x12a

goroutine 39 [chan receive (nil chan)]:
github.com/risor-io/risor/vm.(*VirtualMachine).Run.func2()
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:102 +0x35
created by github.com/risor-io/risor/vm.(*VirtualMachine).Run
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:101 +0x12a

goroutine 87 [chan receive (nil chan)]:
github.com/risor-io/risor/vm.(*VirtualMachine).Run.func2()
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:102 +0x35
created by github.com/risor-io/risor/vm.(*VirtualMachine).Run
        /home/jake/projects/yabs/.yabs/go/pkg/mod/github.com/jakegut/[email protected]/vm/vm.go:101 +0x12a

Better error handling

Currently, we os.exit(1) when most errors are encountered. Just don't do this. Allow the API caller to handle any errors

Add node, npm toolchain

This is straight forward, up until we have to deal with node_modules. Can we npm install in .yabs and symlink the node_modules?

Add telementry

Add a way to output more granular task information by implementing tracing

Add a way to bootstrap the build config

Running go run /path/to/build.go is not ideal since it relies on the host's go version. Provide a way to build the "build.go" using a stable go version.

  1. Provide built-in bootstrap target to build itself and have the user only use that. However, it requires the user to have knowledge of said bootstrap target and remembering to run the binary
  2. Release a yabs binary to facilitate the building of the go file and caching the built binary. You can use yabs to call the resulting binary and pass cmd args to that

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.