Skip to content

Conversation

Copy link

Copilot AI commented Nov 2, 2025

Review comment questioned whether dependent_paths() should resolve relative paths using env::current_dir() to match plugins.rs behavior. Investigation confirms the hot_reload crate already handles this internally.

Findings

The hot_reload crate's resolve_dependency_path() resolves relative paths against the parent directory of the config file, not the current working directory:

fn resolve_dependency_path(&self, path: PathBuf) -> PathBuf {
  let candidate = if path.is_absolute() {
    path
  } else if let Some(parent) = self.file_path.parent() {
    parent.join(path)  // Resolves relative to config file location
  } else {
    path
  };
  candidate.canonicalize().unwrap_or(candidate)
}

Conclusion

Current implementation in target_config.rs is correct - dependent_paths() returns paths as-is via PathBuf::from(). The crate handles resolution internally, making paths relative to config file location rather than working directory. This is more robust than env::current_dir() approach.

No code changes required.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Author

Copilot AI commented Nov 2, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.rs
    • Triggering command: curl -s REDACTED (dns block)
  • https://api.github.com/repos/junkurihara/odoh-rs/commits/master
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo fetch (http block)
  • https://api.github.com/repos/junkurihara/rust-token-server/commits/develop
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo fetch (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update relative path resolution for config file reloading Verify hot_reload crate handles relative path resolution for dependent files Nov 2, 2025
Copilot AI requested a review from junkurihara November 2, 2025 15:03
Copilot finished work on behalf of junkurihara November 2, 2025 15:03
@junkurihara junkurihara closed this Nov 2, 2025
@junkurihara junkurihara deleted the copilot/sub-pr-77 branch November 2, 2025 15:04
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