aider icon indicating copy to clipboard operation
aider copied to clipboard

YAML file option trying to load non-existant files

Open Ga68 opened this issue 1 year ago • 3 comments

Issue

If you use the YAML option for file to automatically load a specific file (CONVENTIONS.md being a typical example) and the file doesn't exist in your repo, it still indicates it as loaded, but the contents are empty (if you were to /ask about it).

I believe the behavior should be that if the file doesn't exist, it just doesn't load that file. Perhaps a warning on aider start (something like WARNING: tried to load ... but was unable to find the file locally).

Version and model info

0.46

Ga68 avatar Jul 30 '24 15:07 Ga68

Thanks for trying aider and filing this issue.

When you run aider with a file that doesn't exist, it creates it as an empty file. That applies to files specified on the command line or in the yaml file.

paul-gauthier avatar Jul 30 '24 16:07 paul-gauthier

I guess I am wondering why you added CONVENTIONS.md to be always loaded if you don't always have one?

paul-gauthier avatar Jul 30 '24 16:07 paul-gauthier

ha - good point :) I'm using it in my global config under the presumption that I SHOULD have one, but was perhaps over-indexing on an "edge" case where I've not included one in a specific project I'm working on.

I guess my mindset on that file option was along the lines of "attempt to use the following files".

If you don't think it makes sense to existence check those files on load, I understand where you're coming from. Appreciate the consideration.

Ga68 avatar Jul 30 '24 17:07 Ga68

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.

paul-gauthier avatar Aug 05 '24 13:08 paul-gauthier

solved (i think) https://github.com/paul-gauthier/aider/issues/941

Ga68 avatar Aug 11 '24 13:08 Ga68