falco icon indicating copy to clipboard operation
falco copied to clipboard

[Feature] Git Based Resolver

Open davinci26 opened this issue 1 year ago • 1 comments

The way we use VCL and manage dependencies at $company is by having them versioned in a separate git repository and I would like to build a git file resolver that allows you to resolve paths based on path:version and then use git show $REV:$FILE to get the file rather than just reading it from disk

So the proposed changes are:

  • GitFileResolver that implements the Resolver interface
  • func NewGitFileResolvers(main string, c *Config) ([]Resolver, error) and switch between the two implementations based on the command line flag

Addition of two command line flags:

  • -repo : Path to the git repo that contains the modules
  • -git : Use git to read versioned files that in the form of path/to/file/:version

WDYT?

davinci26 avatar Aug 23 '22 17:08 davinci26

I have this implemented just wanted to push it the upstream rather than having this patch on our fork.

I believe this might be useful for other people who version their VCL dependencies

davinci26 avatar Aug 23 '22 17:08 davinci26