Skip to content

feat: support local file paths in addition to remote URLs#23

Closed
fanyang89 wants to merge 1 commit intovet-run:mainfrom
fanyang89:main
Closed

feat: support local file paths in addition to remote URLs#23
fanyang89 wants to merge 1 commit intovet-run:mainfrom
fanyang89:main

Conversation

@fanyang89
Copy link

Allows vet to process local script files directly without downloading, making it more convenient for local development and testing.

Allows vet to process local script files directly without downloading,
making it more convenient for local development and testing.
@lykhvar
Copy link
Contributor

lykhvar commented Jul 25, 2025

Thanks for this! The idea looks good — I'll take a proper look soon.

@lykhvar
Copy link
Contributor

lykhvar commented Jul 27, 2025

The main piece we still need to solve is the caching/diffing feature. Applying the current URL-based logic to local file paths will lead to some confusing behavior, since relative paths may vary for the same file (symlinks is an example of another edge case).

I see two main options:

  • We could just turn off caching for local files. It's the safest option and avoids tricky edge cases, but you lose the diff functionality.
  • We could cache local files using their absolute path. This keeps the diff feature but has weird edge cases if you rename a file.

What's your gut feeling on which path is better?

@fanyang89
Copy link
Author

Hi @lykhvar, what are your thoughts on this approach?

My idea is to treat file paths as just another form of URL, so we can integrate them into our existing URL caching logic.

For file renames or path updates, it would be similar to a broken URL. Since we can't track file system changes, we'd simply invalidate the cache for that path. Does that sound reasonable?

@fanyang89 fanyang89 closed this Feb 7, 2026
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