tailcallhq / tailcall

High Performance GraphQL Runtime
https://tailcall.run
Apache License 2.0
1.26k stars 238 forks source link

Add a `--watch` feature #2688

Open tusharmath opened 1 month ago

tusharmath commented 1 month ago

Use rs-notify library to identify if the source files have changed and restart the server when it does.

Example Usage

tailcall start ./jp.graphql --watch

Technical Requirements

tusharmath commented 1 month ago

/bounty 50$

algora-pbc[bot] commented 1 month ago

💎 $50 bounty • Tailcall Inc.

Steps to solve:

  1. Start working: Comment /attempt #2688 with your implementation plan
  2. Submit work: Create a pull request including /claim #2688 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

🙏 Thank you for contributing to tailcallhq/tailcall! 🧐 Checkout our guidelines before you get started. 💵 More about our bounty program.

Attempt Started (GMT+0) Solution
🔴 @neo773 Aug 14, 2024, 7:54:47 AM WIP
🔴 @harshtech123 Aug 14, 2024, 10:34:00 AM WIP
🔴 @akhilender-bongirwar Aug 14, 2024, 1:02:57 PM WIP
🔴 @onyedikachi-david Aug 14, 2024, 2:01:16 PM WIP
🟢 @beelchester Aug 14, 2024, 2:55:39 PM #2707
harshtech123 commented 1 month ago

/attempt #2688

akhilender-bongirwar commented 1 month ago

/attempt #2689

algora-pbc[bot] commented 1 month ago

[!NOTE] The user @harshtech123 is already attempting to complete issue #2688 and claim the bounty. We recommend checking in on @harshtech123's progress, and potentially collaborating, before starting a new solution.

onyedikachi-david commented 1 month ago

/attempt #2688

Algora profile Completed bounties Tech Active attempts Options
@onyedikachi-david    3 tailcallhq bounties
+ 2 bounties from 1 project
JavaScript, Shell
Cancel attempt
beelchester commented 1 month ago

/attempt #2688

Algora profile Completed bounties Tech Active attempts Options
@beelchester 8 tailcallhq bounties
Rust, TypeScript,
CSS & more
Cancel attempt
algora-pbc[bot] commented 1 month ago

💡 @beelchester submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] commented 1 month ago

@harshtech123: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏

algora-pbc[bot] commented 1 month ago

@onyedikachi-david: Reminder that in 1 days the bounty will become up for grabs, so please submit a pull request before then 🙏

bnchi commented 1 month ago

rs-notify doesn't work well with VIM or some other editors when watching for specific files : https://docs.rs/notify/latest/notify/#editor-behaviour

It's a bit tricky as well to watch for files that are linked in a @link directive because the src path is relative to the file they're defined in

beelchester commented 1 month ago

rs-notify doesn't work well with VIM or some other editors when watching for specific files : https://docs.rs/notify/latest/notify/#editor-behaviour

Yes, true. It may trigger 2 or more data change events on a single file modification. To fix this I have added a debounce delay in my PR (https://github.com/tailcallhq/tailcall/pull/2707), it ignores modification events for a specified time after the initial trigger to restart the server. It is working reliably well.