Skip to content
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

Add description field to package metadata #174

Merged
merged 3 commits into from Aug 22, 2017

Conversation

@earlbread
Copy link
Contributor

@earlbread earlbread commented Aug 21, 2017

This patch adds the description field to package metadata. (#100)

Copy link
Member

@dahlia dahlia left a comment

@earlbread Everything looks good to me except for some trivial style things. 👍🏼

@@ -37,7 +37,11 @@ import Nirum.Constructs.TypeExpression ( TypeExpression ( ListModifier
)
import Nirum.Package (Package (metadata, modules), resolveBoundModule)
import Nirum.Package.Metadata ( Author (Author, email, name, uri)
, Metadata (Metadata, authors, target, version)
, Metadata (Metadata

This comment has been minimized.

@dahlia

dahlia Aug 21, 2017
Member

A space should be inserted after the opening parenthesis (so that parentheses are vertically aligned with commas) e.g.:

, Metadata ( Metadata
           , authors

This comment has been minimized.

@earlbread

earlbread Aug 22, 2017
Author Contributor

Ok, I'll update it. Thank you!

@@ -35,7 +35,12 @@ import Nirum.Package ( BoundModule (boundPackage, modulePath)
, scanPackage
, types
)
import Nirum.Package.Metadata ( Metadata (Metadata, authors, target, version)
import Nirum.Package.Metadata ( Metadata (Metadata

This comment has been minimized.

@dahlia

dahlia Aug 21, 2017
Member

A space should be inserted after the opening parenthesis (so that parentheses are vertically aligned with commas) e.g.:

, Metadata ( Metadata
           , authors
@@ -1207,6 +1213,10 @@ setup(
pName = packageName $ target metadata'
pVersion :: Code
pVersion = SV.toText $ version metadata'
pDescription :: Code
pDescription = case description metadata' of
Just value -> T.intercalate "" ["'", value, "'"]

This comment has been minimized.

@dahlia

dahlia Aug 21, 2017
Member

It can be broken if value contains any apostrophe characters (i.e. single quotes).

This comment has been minimized.

@earlbread

earlbread Aug 22, 2017
Author Contributor

You're right! How about this change?

pDescription = case description metadata' of
                  Just value -> stringLiteral value

This comment has been minimized.

@dahlia

dahlia Aug 22, 2017
Member

It's why stringLiteral function exists. Seems correct.

This comment has been minimized.

@earlbread

earlbread Aug 22, 2017
Author Contributor

So I'll fix like above. Thank you!

@@ -117,7 +117,12 @@ import Nirum.Package ( BoundModule
, types
)
import Nirum.Package.Metadata ( Author (Author, name, email)
, Metadata (Metadata, authors, target, version)
, Metadata (Metadata

This comment has been minimized.

@dahlia

dahlia Aug 21, 2017
Member

A space should be inserted after the opening parenthesis (so that parentheses are vertically aligned with commas) e.g.:

, Metadata ( Metadata
           , authors
@@ -1,7 +1,12 @@
{-# LANGUAGE GADTs, QuasiQuotes, RankNTypes, ScopedTypeVariables,
StandaloneDeriving, TypeFamilies #-}
module Nirum.Package.Metadata ( Author (Author, email, name, uri)
, Metadata (Metadata, authors, target, version)
, Metadata (Metadata

This comment has been minimized.

@dahlia

dahlia Aug 21, 2017
Member

A space should be inserted after the opening parenthesis (so that parentheses are vertically aligned with commas) e.g.:

, Metadata ( Metadata
           , authors
@earlbread
Copy link
Contributor Author

@earlbread earlbread commented Aug 22, 2017

@dahlia I fixed things you mentioned. Thank you!

@dahlia
dahlia approved these changes Aug 22, 2017
Copy link
Member

@dahlia dahlia left a comment

Looks good to me.

@dahlia dahlia merged commit 33c5129 into nirum-lang:master Aug 22, 2017
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
This was referenced Aug 22, 2017
@earlbread earlbread deleted the earlbread:add_description_metadata branch Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants