Skip to content

Add psc-publish warning for unacceptable versions#1172

Merged
paf31 merged 1 commit intopurescript:masterfrom
hdgarrood:warn-unacceptable-version
Jun 28, 2015
Merged

Add psc-publish warning for unacceptable versions#1172
paf31 merged 1 commit intopurescript:masterfrom
hdgarrood:warn-unacceptable-version

Conversation

@hdgarrood
Copy link
Copy Markdown
Contributor

A problem arose with a package that depended on purescript-maybe, and
was using the version 0.3.0-rc.1. Haskell's Data.Version refuses to
parse this as a Version, which means purescript-maybe was missing from
the resolvedDependencies.

Now, if the resolved Bower version for dependencies is not parseable
into a Version, a warning will be emitted, although it will still be
missing from resolvedDependencies.

In the longer term, we should look at using a Version data type that
supports semver properly, which would probably eliminate this issue
completely.

A problem arose with a package that depended on purescript-maybe, and
was using the version 0.3.0-rc.1. Haskell's Data.Version refuses to
parse this as a Version, which means purescript-maybe was missing from
the resolvedDependencies.

Now, if the resolved Bower version for dependencies is not parseable
into a Version, a warning will be emitted, although it will still be
missing from resolvedDependencies.

In the longer term, we should look at using a Version data type that
supports semver properly, which would probably eliminate this issue
completely.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just [PackageWarning] out of curiosity?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to collect all the warnings of each type up together, so that I can then create one Box for each type of warning, in order to make the messages easier to understand. This code makes sure that, for example, all of the UndeclaredDependency warnings are collected up and displayed together, giving a message like "the following are installed but not declared: [list]". It works similarly for the other two PackageWarning constructors.

paf31 added a commit that referenced this pull request Jun 28, 2015
Add psc-publish warning for unacceptable versions
@paf31 paf31 merged commit 8ffcf98 into purescript:master Jun 28, 2015
@hdgarrood hdgarrood deleted the warn-unacceptable-version branch June 29, 2015 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants