Support the purs.json manifest in purs publish#4233
Conversation
JordanMartinez
left a comment
There was a problem hiding this comment.
Just some overall comments. This looks good to me, but I haven't pulled it down locally and tried it out yet.
|
So long as the tests pass, this will get an approval from me. |
|
For anyone who would like to test this out locally you can follow the steps below. I'm assuming you've already built this branch and have access to the resulting First, clone the $ git clone git@github.com:thomashoneyman/purescript-slug
$ cd purescript-slugNext, check out the $ git checkout v3.0.1
$ spago installThen, add the following {
"name": "slug",
"version": "3.0.1",
"license": "MIT",
"location": {
"githubOwner": "thomashoneyman",
"githubRepo": "purescript-slug"
},
"dependencies": {
"argonaut-codecs": ">=8.0.0 <9.0.0",
"arrays": ">=6.0.0 <7.0.0",
"either": ">=5.0.0 <6.0.0",
"maybe": ">=5.0.0 <6.0.0",
"prelude": ">=5.0.0 <6.0.0",
"strings": ">=5.0.0 <6.0.0",
"unicode": ">=5.0.0 <6.0.0"
}
}Finally, add the following {
"purescript-argonaut-codecs": {
"path": ".spago/argonaut-codecs/v8.0.0"
},
"purescript-argonaut-core": {
"path": ".spago/argonaut-core/v6.0.0"
},
"purescript-arrays": {
"path": ".spago/arrays/v6.0.0"
},
"purescript-bifunctors": {
"path": ".spago/bifunctors/v5.0.0"
},
"purescript-const": {
"path": ".spago/const/v5.0.0"
},
"purescript-contravariant": {
"path": ".spago/contravariant/v5.0.0"
},
"purescript-control": {
"path": ".spago/control/v5.0.0"
},
"purescript-distributive": {
"path": ".spago/distributive/v5.0.0"
},
"purescript-effect": {
"path": ".spago/effect/v3.0.0"
},
"purescript-either": {
"path": ".spago/either/v5.0.0"
},
"purescript-enums": {
"path": ".spago/enums/v5.0.0"
},
"purescript-exists": {
"path": ".spago/exists/v5.0.0"
},
"purescript-foldable-traversable": {
"path": ".spago/foldable-traversable/v5.0.0"
},
"purescript-foreign-object": {
"path": ".spago/foreign-object/v3.0.0"
},
"purescript-functions": {
"path": ".spago/functions/v5.0.0"
},
"purescript-functors": {
"path": ".spago/functors/v4.0.0"
},
"purescript-gen": {
"path": ".spago/gen/v3.0.0"
},
"purescript-identity": {
"path": ".spago/identity/v5.0.0"
},
"purescript-integers": {
"path": ".spago/integers/v5.0.0"
},
"purescript-invariant": {
"path": ".spago/invariant/v5.0.0"
},
"purescript-lazy": {
"path": ".spago/lazy/v5.0.0"
},
"purescript-lists": {
"path": ".spago/lists/v6.0.0"
},
"purescript-math": {
"path": ".spago/math/v3.0.0"
},
"purescript-maybe": {
"path": ".spago/maybe/v5.0.0"
},
"purescript-newtype": {
"path": ".spago/newtype/v4.0.0"
},
"purescript-nonempty": {
"path": ".spago/nonempty/v6.0.0"
},
"purescript-numbers": {
"path": ".spago/numbers/v8.0.0"
},
"purescript-ordered-collections": {
"path": ".spago/ordered-collections/v2.0.0"
},
"purescript-orders": {
"path": ".spago/orders/v5.0.0"
},
"purescript-partial": {
"path": ".spago/partial/v3.0.0"
},
"purescript-prelude": {
"path": ".spago/prelude/v5.0.0"
},
"purescript-profunctor": {
"path": ".spago/profunctor/v5.0.0"
},
"purescript-record": {
"path": ".spago/record/v3.0.0"
},
"purescript-refs": {
"path": ".spago/refs/v5.0.0"
},
"purescript-safe-coerce": {
"path": ".spago/safe-coerce/v1.0.0"
},
"purescript-st": {
"path": ".spago/st/v5.0.0"
},
"purescript-strings": {
"path": ".spago/strings/v5.0.0"
},
"purescript-tailrec": {
"path": ".spago/tailrec/v5.0.0"
},
"purescript-tuples": {
"path": ".spago/tuples/v6.0.0"
},
"purescript-type-equality": {
"path": ".spago/type-equality/v4.0.0"
},
"purescript-typelevel-prelude": {
"path": ".spago/typelevel-prelude/v6.0.0"
},
"purescript-unfoldable": {
"path": ".spago/unfoldable/v5.0.0"
},
"purescript-unicode": {
"path": ".spago/unicode/v5.0.0"
},
"purescript-unsafe-coerce": {
"path": ".spago/unsafe-coerce/v5.0.0"
}
}At this point, you should have both files required for publishing, and your git tree should be dirty with only the $ git status
HEAD detached at v3.0.1
Untracked files:
(use "git add <file>..." to include in what will be committed)
.purs.json
nothing added to commit but untracked files present (use "git add" to track)Finally, you can publish the library (here, assuming that the resolutions file is in the parent directory): purs publish --manifest .purs.json --resolutions ../resolutions.jsonThis will yield the following successful publish result: {"uploader":null,"packageMeta":{"homepage":"https://github.com/thomashoneyman/purescript-slug.git","repository":{"url":"https://github.com/thomashoneyman/purescript-slug.git","type":"git"},"dependencies":{"purescript-unicode":">=5.0.0 <6.0.0","purescript-either":">=5.0.0 <6.0.0","purescript-arrays":">=6.0.0 <7.0.0","purescript-maybe":">=5.0.0 <6.0.0","purescript-prelude":">=5.0.0 <6.0.0","purescript-argonaut-codecs":">=8.0.0 <9.0.0","purescript-strings":">=5.0.0 <6.0.0"},"name":"purescript-slug","license":["MIT"]},"tagTime":"2022-02-24T02:38:22+0000","modules":[{"reExports":[],"name":"Slug","comments":null,"declarations":[{"kind":null,"children":[{"comments":null,"title":"eqSlug","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Eq"],"Eq"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]}},"sourceSpan":{"start":[33,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[33,34]}},{"comments":null,"title":"ordSlug","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Ord"],"Ord"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]}},"sourceSpan":{"start":[34,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[34,36]}},{"comments":null,"title":"semigroupSlug","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Semigroup"],"Semigroup"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]}},"sourceSpan":{"start":[35,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[35,56]}},{"comments":null,"title":"showSlug","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Show"],"Show"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]}},"sourceSpan":{"start":[37,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[38,43]}},{"comments":null,"title":"encodeJsonSlug","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Argonaut","Encode","Class"],"EncodeJson"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]}},"sourceSpan":{"start":[40,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[41,37]}},{"comments":null,"title":"decodeJsonSlug","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Argonaut","Decode","Class"],"DecodeJson"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]}},"sourceSpan":{"start":[43,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[44,67]}}],"comments":"A `Slug` represents a string value which is guaranteed to have the\nfollowing qualities:\n\n- it is not empty\n- it consists of alphanumeric groups of characters separated by `-`\n dashes, where the slug cannot begin or end with a dash, and there\n can never be two dashes in a row.\n- every character with a defined notion of case is lower-cased\n\nExample: `Slug \"this-is-an-article-slug\"`\n","title":"Slug","info":{"roles":[],"declType":"data","dataDeclType":"newtype","typeArguments":[]},"sourceSpan":{"start":[31,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[31,27]}},{"kind":null,"children":[],"comments":"Create a `Slug` from a string. This will transform the input string\nto be a valid slug (if it is possible to do so) by separating words\nwith `-` dashes, ensuring the string does not begin or end with a\ndash, and ensuring there are never two dashes in a row.\n\nSlugs are usually created for article titles and other resources\nwhich need a human-readable resource name in a URL.\n\n```purescript\n> Slug.generate \"My article title!\"\n> Just (Slug \"my-article-title\")\n\n> Slug.generate \"¬¬¬{}¬¬¬\"\n> Nothing\n```\n","title":"generate","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Maybe"],"Maybe"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]}]}},"sourceSpan":{"start":[61,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[61,33]}},{"kind":null,"children":[],"comments":"Parse a valid slug (as a string) into a `Slug`. This will fail if the\nstring is not a valid slug and does not provide the same behavior as\n`generate`.\n\n```purescript\n> Slug.parse \"my-article-title\"\n> Just (Slug \"my-article-title\")\n\n> Slug.parse \"My article\"\n> Nothing\n```\n","title":"parse","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Maybe"],"Maybe"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]}]}},"sourceSpan":{"start":[92,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[92,30]}},{"kind":null,"children":[],"comments":"Unwrap a `Slug` into the string contained within, without performing\nany transformations.\n\n```purescript\n> Slug.toString (mySlug :: Slug)\n> \"my-slug-i-generated\"\n```\n","title":"toString","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]}},"sourceSpan":{"start":[106,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[106,27]}},{"kind":null,"children":[],"comments":"Ensure a `Slug` is no longer than a given number of characters. If the last\ncharacter is a dash, it will also be removed. Providing a non-positive\nnumber as the length will return `Nothing`.\n\n```purescript\n> Slug.create \"My article title is long!\" >>= Slug.truncate 3\n> Just (Slug \"my\")\n```\n","title":"truncate","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Maybe"],"Maybe"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Slug"],"Slug"]}]}]}]}},"sourceSpan":{"start":[117,1],"name":"/Users/trh/Desktop/purescript-slug/src/Slug.purs","end":[117,38]}}]}],"resolvedDependencies":{},"version":"3.0.1","github":["thomashoneyman","purescript-slug"],"versionTag":"v3.0.1","moduleMap":{"Data.BooleanAlgebra":"purescript-prelude","Data.Decide":"purescript-contravariant","Type.Data.Boolean":"purescript-typelevel-prelude","Data.Ring":"purescript-prelude","Data.Semigroup.Generic":"purescript-prelude","Record.Unsafe.Union":"purescript-record","Data.Functor.Product":"purescript-functors","Type.Function":"purescript-typelevel-prelude","Data.Functor.Flip":"purescript-functors","Data.NonEmpty":"purescript-nonempty","Effect.Uncurried":"purescript-effect","Data.Char.Gen":"purescript-strings","Data.Monoid.Generic":"purescript-prelude","Data.String.NonEmpty":"purescript-strings","Effect":"purescript-effect","Data.Traversable.Accum.Internal":"purescript-foldable-traversable","Data.CodePoint.Unicode.Internal":"purescript-unicode","Data.Enum.Gen":"purescript-enums","Data.Functor.Costar":"purescript-functors","Data.HeytingAlgebra.Generic":"purescript-prelude","Data.Functor.Compose":"purescript-functors","Foreign.Object.Gen":"purescript-foreign-object","Type.Row.Homogeneous":"purescript-typelevel-prelude","Data.Int.Bits":"purescript-integers","Data.String.CodePoints":"purescript-strings","Data.Ord":"purescript-prelude","Control.Monad.Gen":"purescript-gen","Data.Bounded.Generic":"purescript-prelude","Type.Data.Row":"purescript-prelude","Data.Argonaut.Parser":"purescript-argonaut-core","Data.Argonaut.Encode.Combinators":"purescript-argonaut-codecs","Safe.Coerce":"purescript-safe-coerce","Data.Monoid.Dual":"purescript-prelude","Control.Monad.Rec.Class":"purescript-tailrec","Data.Bitraversable":"purescript-foldable-traversable","Record.Builder":"purescript-record","Data.Boolean":"purescript-prelude","Data.Show.Generic":"purescript-prelude","Data.Map":"purescript-ordered-collections","Control.Biapplicative":"purescript-bifunctors","Data.Array.NonEmpty.Internal":"purescript-arrays","Type.Proxy":"purescript-prelude","Data.String.Unicode":"purescript-unicode","Data.Array.ST.Iterator":"purescript-arrays","Data.Enum.Generic":"purescript-enums","Data.String.Pattern":"purescript-strings","Data.Bounded":"purescript-prelude","Data.TraversableWithIndex":"purescript-foldable-traversable","Data.Int":"purescript-integers","Data.Profunctor.Cochoice":"purescript-profunctor","Data.Show":"purescript-prelude","Data.Foldable":"purescript-foldable-traversable","Data.Divide":"purescript-contravariant","Data.Number":"purescript-numbers","Data.Enum":"purescript-enums","Foreign.Object":"purescript-foreign-object","Control.Apply":"purescript-prelude","Data.Functor.Contravariant":"purescript-contravariant","Data.Tuple.Nested":"purescript-tuples","Data.List.Internal":"purescript-lists","Control.Monad":"purescript-prelude","Data.Lazy":"purescript-lazy","Data.Monoid":"purescript-prelude","Data.Profunctor.Closed":"purescript-profunctor","Data.Ord.Generic":"purescript-prelude","Data.String.Common":"purescript-strings","Data.Maybe.First":"purescript-maybe","Control.Bind":"purescript-prelude","Data.Profunctor.Split":"purescript-profunctor","Data.Number.Format":"purescript-numbers","Data.CodePoint.Unicode.Internal.Casing":"purescript-unicode","Data.Monoid.Additive":"purescript-prelude","Data.Symbol":"purescript-prelude","Data.Map.Gen":"purescript-ordered-collections","Data.String.Regex":"purescript-strings","Data.Profunctor.Join":"purescript-profunctor","Data.HeytingAlgebra":"purescript-prelude","Control.Alt":"purescript-control","Control.Monad.ST.Internal":"purescript-st","Type.Data.RowList":"purescript-prelude","Effect.Ref":"purescript-refs","Data.Either.Inject":"purescript-either","Foreign.Object.ST.Unsafe":"purescript-foreign-object","Data.List.ZipList":"purescript-lists","Data.Ord.Min":"purescript-orders","Data.Functor.Coproduct.Nested":"purescript-functors","Data.Ring.Generic":"purescript-prelude","Data.Semigroup":"purescript-prelude","Data.Array.NonEmpty":"purescript-arrays","Data.Const":"purescript-const","Data.Argonaut.Encode.Class":"purescript-argonaut-codecs","Data.Ord.Down":"purescript-orders","Data.Number.Approximate":"purescript-numbers","Data.Array.ST.Partial":"purescript-arrays","Effect.Unsafe":"purescript-effect","Type.Data.Ordering":"purescript-typelevel-prelude","Data.Tuple":"purescript-tuples","Data.Functor.Clown":"purescript-functors","Data.Semigroup.Foldable":"purescript-foldable-traversable","Control.Biapply":"purescript-bifunctors","Data.Distributive":"purescript-distributive","Type.Equality":"purescript-type-equality","Control.Alternative":"purescript-control","Data.Semiring":"purescript-prelude","Data.Functor.Product2":"purescript-functors","Data.Exists":"purescript-exists","Data.CodePoint.Unicode":"purescript-unicode","Data.Traversable.Accum":"purescript-foldable-traversable","Data.CommutativeRing":"purescript-prelude","Data.NaturalTransformation":"purescript-prelude","Data.Monoid.Conj":"purescript-prelude","Data.Functor.App":"purescript-functors","Data.Profunctor.Star":"purescript-profunctor","Data.Unfoldable":"purescript-unfoldable","Type.RowList":"purescript-typelevel-prelude","Foreign.Object.Unsafe":"purescript-foreign-object","Control.Monad.ST":"purescript-st","Data.Argonaut.Decode":"purescript-argonaut-codecs","Data.List.Types":"purescript-lists","Data.String.NonEmpty.CodeUnits":"purescript-strings","Data.Functor":"purescript-prelude","Unsafe.Coerce":"purescript-unsafe-coerce","Data.Profunctor.Strong":"purescript-profunctor","Data.List.Lazy.Types":"purescript-lists","Control.Category":"purescript-prelude","Control.Monad.Gen.Common":"purescript-gen","Data.Maybe":"purescript-maybe","Type.Row":"purescript-typelevel-prelude","Data.String.Regex.Unsafe":"purescript-strings","Foreign.Object.ST":"purescript-foreign-object","Data.Set":"purescript-ordered-collections","Data.Profunctor":"purescript-profunctor","Control.Comonad":"purescript-control","Control.Monad.ST.Global":"purescript-st","Data.Function":"purescript-prelude","Data.List":"purescript-lists","Data.Field":"purescript-prelude","Data.List.Lazy":"purescript-lists","Data.EuclideanRing":"purescript-prelude","Data.Semigroup.Last":"purescript-prelude","Data.Semigroup.First":"purescript-prelude","Data.Functor.Invariant":"purescript-invariant","Data.Comparison":"purescript-contravariant","Data.String.Unsafe":"purescript-strings","Prelude":"purescript-prelude","Data.Argonaut.Decode.Error":"purescript-argonaut-codecs","Effect.Class":"purescript-effect","Data.Predicate":"purescript-contravariant","Partial.Unsafe":"purescript-partial","Data.Array":"purescript-arrays","Control.Extend":"purescript-control","Data.Unfoldable1":"purescript-unfoldable","Control.Lazy":"purescript-control","Data.Function.Uncurried":"purescript-functions","Data.Functor.Product.Nested":"purescript-functors","Data.Eq":"purescript-prelude","Data.Either.Nested":"purescript-either","Data.Newtype":"purescript-newtype","Data.Semigroup.Traversable":"purescript-foldable-traversable","Data.Bifunctor":"purescript-bifunctors","Data.Argonaut.Encode.Encoders":"purescript-argonaut-codecs","Data.Argonaut.Decode.Decoders":"purescript-argonaut-codecs","Data.Monoid.Disj":"purescript-prelude","Control.Monad.Gen.Class":"purescript-gen","Data.Array.Partial":"purescript-arrays","Data.String.CaseInsensitive":"purescript-strings","Control.MonadPlus":"purescript-control","Data.Void":"purescript-prelude","Control.MonadZero":"purescript-control","Data.Profunctor.Costrong":"purescript-profunctor","Data.Ord.Max":"purescript-orders","Data.String.CodeUnits":"purescript-strings","Data.FunctorWithIndex":"purescript-foldable-traversable","Data.Divisible":"purescript-contravariant","Data.Eq.Generic":"purescript-prelude","Data.DivisionRing":"purescript-prelude","Record":"purescript-record","Data.Equivalence":"purescript-contravariant","Data.Maybe.Last":"purescript-maybe","Data.Unit":"purescript-prelude","Data.Argonaut.Decode.Parser":"purescript-argonaut-codecs","Data.List.NonEmpty":"purescript-lists","Data.List.Lazy.NonEmpty":"purescript-lists","Data.Ordering":"purescript-prelude","Data.Functor.Coproduct":"purescript-functors","Data.Argonaut.Decode.Combinators":"purescript-argonaut-codecs","Data.Identity":"purescript-identity","Math":"purescript-math","Data.Set.NonEmpty":"purescript-ordered-collections","Data.String":"purescript-strings","Control.Plus":"purescript-control","Data.Argonaut.Encode":"purescript-argonaut-codecs","Data.Map.Internal":"purescript-ordered-collections","Partial":"purescript-partial","Data.String.NonEmpty.CodePoints":"purescript-strings","Data.Decidable":"purescript-contravariant","Data.String.NonEmpty.Internal":"purescript-strings","Data.Monoid.Multiplicative":"purescript-prelude","Data.String.NonEmpty.CaseInsensitive":"purescript-strings","Data.Functor.Joker":"purescript-functors","Type.Data.Symbol":"purescript-typelevel-prelude","Data.Array.ST":"purescript-arrays","Data.Argonaut.Core":"purescript-argonaut-core","Control.Semigroupoid":"purescript-prelude","Data.Monoid.Alternate":"purescript-control","Data.Char":"purescript-strings","Data.Generic.Rep":"purescript-prelude","Data.Bifunctor.Join":"purescript-bifunctors","Data.Bifoldable":"purescript-foldable-traversable","Control.Monad.ST.Ref":"purescript-st","Data.Monoid.Endo":"purescript-prelude","Data.List.Partial":"purescript-lists","Data.Semiring.Generic":"purescript-prelude","Data.String.Regex.Flags":"purescript-strings","Data.Argonaut.Decode.Class":"purescript-argonaut-codecs","Data.Either":"purescript-either","Type.Prelude":"purescript-typelevel-prelude","Control.Applicative":"purescript-prelude","Control.Monad.ST.Class":"purescript-st","Data.FoldableWithIndex":"purescript-foldable-traversable","Data.Op":"purescript-contravariant","Record.Unsafe":"purescript-prelude","Data.Argonaut.Gen":"purescript-argonaut-core","Data.Functor.Coproduct.Inject":"purescript-functors","Data.Profunctor.Choice":"purescript-profunctor","Data.Traversable":"purescript-foldable-traversable","Data.String.Gen":"purescript-strings"},"compilerVersion":"0.14.5"} |
|
I was a little suspicious of the purescript/src/Language/PureScript/Publish.hs Line 151 in f9f75f4 I haven't pieced together exactly when this field gets set or if it's a legacy thing; looks like it was placed there 7 years ago when |
|
I followed your instructions and got a slightly different result. |
|
That's odd. I tried to reproduce fresh, but failed: I did forget in the original instructions that you have to run Is it possible that you had a stale |
|
As a side note, those warnings about missing resolved versions are just because I didn't put specific versions in the resolutions file to save myself some time. In the real world we'd include those versions when generating the resolutions file and there would be no warnings -- that's not related to this PR. |
I ran |
|
Yup, looks like I was using a stale |
| -- For the time being, we only parse manifests that include a GitHub owner | ||
| -- and repo pair, or which specify a Git URL, which we use to try and get | ||
| -- the package from GitHub. | ||
| pursJsonLocation <- key "location" (catchError asOwnerRepo (const asGitUrl)) |
There was a problem hiding this comment.
When I edited the purs.json file, so that the location.githubRepo field was deleted, I got this error:
There is a problem with your package, which meant that it could not be
published.
Details:
There was a problem with your package manifest file:
At the path: ["location"]
The required key "gitUrl" is missing
Please ensure that your package manifest file is valid.
Perhaps instead of const asGitUrl, we should report both errors? For example, something like "after failing to find the location.githubRepo field, tried to parse location as git url, but failed."
There was a problem hiding this comment.
Yea, this is a good point. I'll put together a custom error for it.
|
Changing the license field in IIRC, the Registry only supports one license, not expressions (e.g. AND, OR), correct? If so, then when the Registry is fully deployed and we're dropping support for Bower, we'll need to update this error message to remove the "OR" expression example. |
The registry supports SPDX license expressions, too, so this is a correct error. |
|
Changing the {
"version": "3.0.1",
"versionTag": "v3.0.1",
}If the |
Where are you seeing this?
The git tag is only being used because that's how the existing publishing process works, but the registry does not use git tags to record versions (this would prevent monorepo setups). I don't actually need to parse the version field at all, and can defer only to the version tag. Edit Sorry, I misread your comment. I thought you were seeing the 3.0.0 being picked up, but I see both versions are 3.0.1 as expected. I'll remove the version JSON parsing. |
On second thought, removing the In arguing for this approach, people would already be used to focusing on the In arguing against this, we would then need to handle cases like the So, perhaps dropping |
The registry requires the
It certainly would 😆 this information would have to be threaded through into the |
JordanMartinez
left a comment
There was a problem hiding this comment.
LGTM. I'm guessing you'll want @f-f to review it, too, before it gets merged?
|
It's not strictly necessary, so we can merge if it gets time to be 0.14.6, but I'd like him to take a look if possible. |
|
I'll have a look tomorrow morning! |
f-f
left a comment
There was a problem hiding this comment.
This looks great, thanks @thomashoneyman!
Description of the change
Fixes #4231 by adding partial support for the PureScript registry manifest format to
purs publish. We can only provide partial support for packages using the PureScript registry because bothpurs publishand Pursuit bake in assumptions about package structure and location that the registry does not require. For example:purs publishand Pursuit require that packages are published to GitHub. The registry doesn't restrict where a package can be published, so long as it is publicly accessible.purs publishand Pursuit require that packages specify their version via a SemVer-compliant Git tag such asv1.0.0. The registry allows packages to use any ref to associate with a package version, and takes the version from theversionfield in the package manifest.purs publishand Pursuit require every package to be stored in their own repository on GitHub. The registry supports monorepos, where several packages can be published from one repository (hence why a Git tag can't be used to assert a particular package's version).It isn't possible to support publishing packages that take advantage of these features of the PureScript registry using
purs publishwithout introducing breaking changes. Instead, this PR provides a compatibility layer in which we:purs.jsonfiles as a manifest formatPackageMetaChecklist: