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

More information about watcher #8

Open
kogeletey opened this issue Jan 26, 2024 · 8 comments
Open

More information about watcher #8

kogeletey opened this issue Jan 26, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@kogeletey
Copy link
Contributor

Hi again! Coult you tell me more details about watch actions?
I seem to have turned on watcher and added actions watch to pipelines, but nothihg happens

@pipelight
Copy link
Owner

pipelight commented Jan 26, 2024

Hi!
You need to explicitly enable the file watcher in your project root directory.

https://pipelight.dev/guide/triggers/definition.html#enable-file-watcher-optional

pipelight enable watcher

This will spawn a pipelight instance that watches your directory.

You may want to ignore some files by creating a .pipelight_ignore file.

@kogeletey
Copy link
Contributor Author

Yes, I did that. But it just doesn't work.
This is what is specified in the configuration

[[pipelines.triggers]]
actions = ["watch"]

@kogeletey
Copy link
Contributor Author

By the way, options in toml don't work either
Here is my config - https://github.com/kogeletey/karzok/blob/70523714aa847d6d4413cb11b67a1ed0623ac251/pipelight.toml

@pipelight
Copy link
Owner

Okay thanks for the context!
I am troubleshooting this issue and will come back to you ASAP!

@pipelight pipelight self-assigned this Jan 26, 2024
@pipelight
Copy link
Owner

pipelight commented Jan 26, 2024

Concerning the watcher.
I will need your point of view on the first bug encountered.

I ran the following commands

pipelight watch --attach
pipelight watch --attach -uu

The watcher refuses to start without a .pipelight_ignore file in the project root.

Why?:
I initially wanted to let the user decide which file should be watched without any restriction.
Which means, on rare cases, one can watch the .git directory and build directories if needed.
But watching those path can cause a watch infinite recursion.
Thus the need of an initial .ignore file.

The fixes:

  • either create a default .pipelight_ignore file with pipelight init command.
  • or remove the need of an initial .pipelight_ignore file by hardcoding unrecommended path depending on the project type (autodetected).

Which fix sounds better?

@kogeletey
Copy link
Contributor Author

I caught another interesting bug.
2024-01-26 17-16-04.webm

Thanks for the clarification, I think it would be better to be able to configure which folder or files to specifically view.
And by default creating a file with ignore would be nice.

@pipelight
Copy link
Owner

This might take longer than expected. I must make some integration test and documentation!

@pipelight
Copy link
Owner

pipelight commented Mar 7, 2024

fixed on dev. i need to tidy before merging to master

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

No branches or pull requests

2 participants