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

Fix watcher config example in README #14

Merged
merged 1 commit into from
Dec 27, 2023
Merged

Conversation

samgaw
Copy link
Contributor

@samgaw samgaw commented Dec 12, 2023

Example config errors out due to the way opts is parsed to LightningCSS.run/3:

** (FunctionClauseError) no function clause matching in Keyword.get/3
    (elixir 1.15.7) Keyword.get({:watch, true}, :watch, false)
    (lightning_css 0.4.0) lib/lightning_css.ex:44: LightningCSS.run/3
    (phoenix 1.7.10) lib/phoenix/endpoint/watcher.ex:19: Phoenix.Endpoint.Watcher.watch/2
    (elixir 1.15.7) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
Function: &Phoenix.Endpoint.Watcher.watch/2
    Args: ["css", {LightningCSS, :install_and_run, [:default, [], {:watch, true}]}]

Explicitly passing opts as a list fixes the issue.

Example config errors out due to the way opts is parsed to `LightningCSS.run/3`:
```
** (FunctionClauseError) no function clause matching in Keyword.get/3
    (elixir 1.15.7) Keyword.get({:watch, true}, :watch, false)
    (lightning_css 0.4.0) lib/lightning_css.ex:44: LightningCSS.run/3
    (phoenix 1.7.10) lib/phoenix/endpoint/watcher.ex:19: Phoenix.Endpoint.Watcher.watch/2
    (elixir 1.15.7) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
Function: &Phoenix.Endpoint.Watcher.watch/2
    Args: ["css", {LightningCSS, :install_and_run, [:default, [], {:watch, true}]}]
```
Making `opts` explicitly a list fixes the issue.
@pepicrft pepicrft merged commit f8bba9b into tuist:main Dec 27, 2023
@samgaw samgaw deleted the patch-1 branch September 5, 2024 10:42
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

Successfully merging this pull request may close these issues.

2 participants