-
Notifications
You must be signed in to change notification settings - Fork 27
Add description field to package metadata #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dahlia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@earlbread Everything looks good to me except for some trivial style things. 👍🏼
test/Nirum/Targets/PythonSpec.hs
Outdated
| import Nirum.Package (Package (metadata, modules), resolveBoundModule) | ||
| import Nirum.Package.Metadata ( Author (Author, email, name, uri) | ||
| , Metadata (Metadata, authors, target, version) | ||
| , Metadata (Metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A space should be inserted after the opening parenthesis (so that parentheses are vertically aligned with commas) e.g.:
, Metadata ( Metadata
, authorsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll update it. Thank you!
test/Nirum/PackageSpec.hs
Outdated
| , types | ||
| ) | ||
| import Nirum.Package.Metadata ( Metadata (Metadata, authors, target, version) | ||
| import Nirum.Package.Metadata ( Metadata (Metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A space should be inserted after the opening parenthesis (so that parentheses are vertically aligned with commas) e.g.:
, Metadata ( Metadata
, authors
src/Nirum/Targets/Python.hs
Outdated
| pVersion = SV.toText $ version metadata' | ||
| pDescription :: Code | ||
| pDescription = case description metadata' of | ||
| Just value -> T.intercalate "" ["'", value, "'"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be broken if value contains any apostrophe characters (i.e. single quotes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right! How about this change?
pDescription = case description metadata' of
Just value -> stringLiteral valueThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's why stringLiteral function exists. Seems correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'll fix like above. Thank you!
src/Nirum/Targets/Python.hs
Outdated
| ) | ||
| import Nirum.Package.Metadata ( Author (Author, name, email) | ||
| , Metadata (Metadata, authors, target, version) | ||
| , Metadata (Metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A space should be inserted after the opening parenthesis (so that parentheses are vertically aligned with commas) e.g.:
, Metadata ( Metadata
, authors
src/Nirum/Package/Metadata.hs
Outdated
| StandaloneDeriving, TypeFamilies #-} | ||
| module Nirum.Package.Metadata ( Author (Author, email, name, uri) | ||
| , Metadata (Metadata, authors, target, version) | ||
| , Metadata (Metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A space should be inserted after the opening parenthesis (so that parentheses are vertically aligned with commas) e.g.:
, Metadata ( Metadata
, authors|
@dahlia I fixed things you mentioned. Thank you! |
dahlia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch adds the description field to package metadata. (#100)