Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the chompfile.toml while watching via chomp -w does not invalidate #92

Open
canadaduane opened this issue Mar 14, 2022 · 5 comments

Comments

@canadaduane
Copy link
Collaborator

I modified the chompfile while using chomp -ws and I was expecting it to re-build targets affected by the task whose options I modified:

[[task]]
  name = "build:html"
  template = "jspm"
  target = "lib/index.html"
  deps = ["src/index.html", ":build:svelte", ":build:typescript"]
  [task.template-options]
    env = ["browser", "production"]
    preload = true
    integrity = true

I added whitespace = false to the template-options, expecting index.html's import map to be formatted differently.

@canadaduane
Copy link
Collaborator Author

I may have tested this incorrectly. My chomp -ws command probably should have been chomp build -ws.

@guybedford
Copy link
Owner

Changes to the Chompfile is quite tricky to support, because it means modifying the in-place task graph based on a chompfile diff. So we would effectively need to implement a diffing algorithm which can be translated from a diff on the chompfile into a diff on the task graph, and then also make allowance for irreconcilable diffs to cause a complete reload. Definitely agreed this would be a good goal, will leave this up to track.

@canadaduane
Copy link
Collaborator Author

canadaduane commented Mar 15, 2022 via email

@guybedford
Copy link
Owner

I don't think I've ever written anything to replace the current process with a new invocation of itself? I would need to do more careful book-keeping to multi-instance the application lifecycle unfortunately :(

@guybedford
Copy link
Owner

(but yes you are right that's the way to do it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants