cue-lang / cue

The home of the CUE language! Validate and define text-based and dynamic configuration
https://cuelang.org
Apache License 2.0
5.06k stars 288 forks source link

modules: support for .cueignore #3054

Open rogpeppe opened 5 months ago

rogpeppe commented 5 months ago

As described in #2992 by @ptr1120, sometimes we might want a way to exclude arbitrary files from a CUE module.

To quote that comment:

Regarding .cueignore, I am still a proponent of the ability to explicitly ignore items that are in Git but should not be part of the module. For example, there can be various settings related to IDEs, VCS, and other tools that are version-controlled but would not be appropriate for inclusion in a module. Additionally, I often have shell scripts, CUE tools, and possibly some tests written in CUE which I hope can be excluded.

This issue tracks that feature request.

felixge commented 3 months ago

+1 from me, I'd also find this useful. My use case is that I have a big repository that contains an OpenAPI YAML spec along with a bunch of other things. I'm trying to publish a cue module for this YAML spec, but I only want my generated cue file to be included and nothing else.

Anyway, while this would be nice to have, I can work around this for now.

myitcv commented 3 months ago

@felixge - thanks for the input. Yours sounds more like an explicit include list situation?

rogpeppe commented 3 months ago

@felixge - thanks for the input. Yours sounds more like an explicit include list situation?

... or perhaps a case where exactly the contents of the directory that are relevant for CUE evaluation are included but nothing else?