emacs-eldev / eldev

Elisp development tool
https://emacs-eldev.github.io/eldev/
GNU General Public License v3.0
227 stars 17 forks source link

Error messages #15

Closed sirikid closed 4 years ago

sirikid commented 4 years ago

I hope this picture is enough image

doublep commented 4 years ago

No, I don't know what [1] means. Locally it fails two times in the same way.

If you are missing the fix for #14, then it is because it is not released yet. See also https://github.com/doublep/eldev#upgrading-eldev.

sirikid commented 4 years ago

If there are no files with package headers why is the second invocation succeed? Should it?

doublep commented 4 years ago

Ah, I didn't notice that the second time the answer was n. It succeeds because if Eldev doesn't have to guess archive, it never create package descriptor as not needed, so certain function in Emacs package module doesn't fail.

But actually, I think the first invocation also shouldn't fail. Maybe it should print a warning, but otherwise succeed (without guessing the archive of course, as that would be impossible). I.e. it should be possible to run eldev init even in an empty directory, though of course later you'd have to tweak file Eldev manually. What do you think?

sirikid commented 4 years ago

I think consistent and predictable behaviour is a top priority for development tools. So either both calls must succeed or both must fail.

It might be worth adding the new/create command to create a project from the template.

doublep commented 4 years ago

I think consistent and predictable behaviour is a top priority for development tools. So either both calls must succeed or both must fail.

Now both succeed. However, default mode of init command is interactive: it will ask you if you really want to continue even if the current directory doesn't seem to contain a project (if you plan to create a project, just answer y). There is also option -n (--non-interactive). In this mode the command never asks anything and should always succeed, unless file Eldev is already there. However, in this mode archive autoguessing won't be performed.

It might be worth adding the new/create command to create a project from the template.

I feel a template would be largely empty here. Maybe it could create the main .el file with lots of placeholders (author, license, etc.), but there's not much else boilerplate common to all projects.

sirikid commented 4 years ago

I thought about flycheck and company, but even they've not so many common parts.