redefining tilt builtins makes things really confusing

Open
#2,968 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
tooling

Research direction

The issue provides a reproduction where assigning to sync causes a later non-function call; start by locating Tilt's builtin-definition and assignment handling. Done means assignments to builtin names such as sync fail immediately with a clear error, with the reproduction covered by a regression test.

Written by the indexing model from the issue text.

Description

bug

e.g.:

sync = config.parse().get('sync', False)
...
docker_build('foo', '.',
  live_update=[
    sync('.', '.')
  })

yields:

Error: invalid call of non-function (string)

which could be really hard to debug! especially if someone makes use of this to, e.g., reassign a function to a wrapper of that function with slightly modified behavior, and then someone else tries to debug it without realizing it's been modified.

It'd be nice if trying to assign to "sync" in the first place generated an error.

Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tilt-dev/tilt

All issues in tilt-dev/tilt

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.