Skip to content

Conversation

meetdhanani17
Copy link
Contributor

@meetdhanani17 meetdhanani17 commented Jul 24, 2025

fix(cli/watch): Reload environment variables with --watch and --env-file

  • Added functionality to watch the env file and reload its variables during hot reload execution.
  • fixes issue #29483, #29201

@CLAassistant
Copy link

CLAassistant commented Jul 24, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Would it be possible to add a test for this to ensure it works and continues to work in the future?

@dsherret dsherret changed the title Fix - Reload environment variables with --watch and --env-file fix: reload environment variables with --watch and --env-file Jul 24, 2025
@dsherret
Copy link
Member

I think this is a duplicate of #29555 ?

@meetdhanani17
Copy link
Contributor Author

I think this is a duplicate of #29555 ?

no it's different, you can take reference of the code changes

@meetdhanani17 meetdhanani17 changed the title fix: reload environment variables with --watch and --env-file feat: reload environment variables with --watch and --env-file Jul 27, 2025
@meetdhanani17
Copy link
Contributor Author

meetdhanani17 commented Jul 29, 2025

Hello @dsherret, Could you please guide me with fixes the test cases of pipeline ci / test debug linux-aarch64 (pull_request)?

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This PR seems to be on the right track.

…e management

- Added WatchEnvTracker to track and manage environment variables loaded from .env files.
- Updated `resolve_flags_and_init` and `run_with_watch` functions to utilize the new tracker.
- Enhanced error handling for loading environment variables from files.
@meetdhanani17 meetdhanani17 requested a review from dsherret August 7, 2025 17:52
@dsherret dsherret modified the milestones: 2.4.0, 2.5.0 Aug 14, 2025
@meetdhanani17
Copy link
Contributor Author

meetdhanani17 commented Aug 15, 2025

Hello @dsherret, I have already requested the PR review after resolving all the comments. If there are any changes required, please let me know

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@dsherret dsherret merged commit 8424cd4 into denoland:main Sep 4, 2025
31 of 36 checks passed
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.

3 participants