Skip to content
This repository has been archived by the owner on Jul 7, 2020. It is now read-only.

Wrong error message #30

Open
yvasiyarov opened this issue Apr 28, 2013 · 4 comments
Open

Wrong error message #30

yvasiyarov opened this issue Apr 28, 2013 · 4 comments
Labels

Comments

@yvasiyarov
Copy link

  1. I run
    nut generate

and got error message:

Now you should edit nut.json to fix following errors:
Package summary in code should be in form "Package php_session_decoder ... ."

Its completely wrong, because in turn this message is not related to nut.json file at all.
Instead this message should clearly say what you should add doc.go file to your package.

The second question - why do you push everyone to write package doc exactly in this form:
"Package php_session_decoder ... ."
I dont understand this. I think its my right to document my package as I want.

And its not clear at all what I must have dot at the end of the sentence. I understand what accordingly to english grammar rules I should do it, but run config generation tool - not english spell checker and I expect what it will generate nuts.json and nothing more.

@yvasiyarov
Copy link
Author

I think it will be good to make "nut generate" - just generate sample nuts.json
With message like -
Please, edit your nuts.json file and run "nut check" to check what your package is meet gonuts.io pre-requirements

@AlekSi
Copy link
Owner

AlekSi commented Apr 28, 2013

Now you should edit nut.json to fix following errors:
Package summary in code should be in form "Package php_session_decoder ... ."

Its completely wrong, because in turn this message is not related to nut.json file at all.

Yes, first line is wrong.

@AlekSi
Copy link
Owner

AlekSi commented Apr 28, 2013

Instead this message should clearly say what you should add doc.go file to your package.

doc.go is a convention. I case of simple one-file 📦 it is simpler to add documentation to code file itself.

The second question - why do you push everyone to write package doc exactly in this form:
"Package php_session_decoder ... ."
I dont understand this. I think its my right to document my package as I want.

Sure. Except for the first line. :P Other formats look alien in godoc HTML output.

And its not clear at all what I must have dot at the end of the sentence.

godoc uses first sentence as package summary. See link above.

I expect what it will generate nuts.json and nothing more.

Well, nut generate actually runs nut check after generation. It's convenient.

to check what your package is meet gonuts.io pre-requirements

It's more about good practices and to prevent WTFs for nut users.

@yvasiyarov
Copy link
Author

doc.go is a convention I case of simple one-file it is simpler to add documentation to code file itself.
yes, I know. And I totally agree with this convention :-) I just think what this message should clearly say - "write the fucking doc.go if you want to publish your packet to gonuts.io" :-)

Sure. Except for the first line. :P Other formats look alien in godoc HTML output.
ok, your game - your rules. But will save some time to peoples if you will highlite what this dot is must have :-) What this dot - is the most important dot in whole packet :-)

Well, nut generate actually runs nut check after generation. It's convenient.
maybe its convenient for "nut generate" debugging - but obviously not for end user.
Real use case is:

  1. nut generate
  2. edit nut.json
  3. nut check
  4. nut pack

Is there any chance what "nut generate" will generate ready to use nut.json ?
Obviously not. WTF then its called ? In 100% cases it MUST be edited before checking.
And "nut check" should check real nut.json file, not working of "nut generate"

Its convenient to call automatically "nut check" before "nut pack", but not after "nut generate"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants