drym-org / symex.el

An intuitive way to edit Lisp symbolic expressions ("symexes") structurally in Emacs
Other
272 stars 23 forks source link

Test files should not provide features #27

Closed tarsius closed 3 years ago

tarsius commented 3 years ago

This concerns the elisp files in the dev/ directories of this package as well as of dynaring.

Test files should not provide a feature. Providing a feature is only suitable for libraries that are loaded by other libraries/packages or by the end user using require. For require to be able to do its job, the library that provides the feature has to be located on the load-path, but test files should not be located on the load-path.

You are probably already loading this test file using something like (load "relative/path/to/it") and can just remove the provide form. If not, then you probably just have to replace a require with a such a load form somewhere.

One reason why test files should not provide a feature and/or reside on the load-path is that authors tend to name those files just tests.el or something like that. If only one package does that, then that works, but it only takes two out of several thousands and things start to get problematic. In fact I usually don't notice such issues until there actually are two packages that provide the exact same "testing feature".

I have written similar messages many many times so I now use a template. I try to adjust it to match each individual case but it might still not apply 100% in all cases.

countvajhula commented 3 years ago

Thanks for pointing that out @tarsius -- I've fixed this in all of my elisp repos, including this one and dynaring. I think that should do it, but if I've missed any instances then please feel free to reopen.

tarsius commented 3 years ago

Thanks! I'll let you know if I see one.