Changeset View
Standalone View
docs/package-loader-specifications.rst
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | * - deposit | |||||||||||
- HEAD | - HEAD | |||||||||||
- only HEAD | - only HEAD | |||||||||||
- HEAD | - HEAD | |||||||||||
- "{client}: Deposit {id} in collection {collection}\n" | - "{client}: Deposit {id} in collection {collection}\n" | |||||||||||
- true | - true | |||||||||||
- original author | - original author | |||||||||||
- ``<codemeta: dateCreated>`` from SWORD XML | - ``<codemeta: dateCreated>`` from SWORD XML | |||||||||||
- revisions had parents | - revisions had parents | |||||||||||
* - hackage | ||||||||||||
- ``p_info.!version`` | ||||||||||||
- ``release_name(!version)`` | ||||||||||||
- =version | ||||||||||||
- Synthetic release for Haskell source package {p_info.name} version {p_info.version} | ||||||||||||
- true | ||||||||||||
- intrinsic metadata if any else from extrinsic metadata | ||||||||||||
- from extrinsic metadata | ||||||||||||
vlorentzUnsubmitted Done Inline Actions
vlorentz: | ||||||||||||
Not Done Inline ActionsOh, I just noticed that it seems to be in the wrong direction. Shouldn't it prioritize extrinsic metadata over intrinsic? vlorentz: Oh, I just noticed that it seems to be in the wrong direction. Shouldn't it prioritize… | ||||||||||||
Done Inline ActionsI think its ok this way. The most accurate data is intrinsic, but sometime author is missing. In this case it falls back to get the username who published new revisions of the package (we use the revisions endpoint to get last update). If getting that username as a fallback does not make sense, let's remove it. franckbret: I think its ok this way. The most accurate data is intrinsic, but sometime author is missing. | ||||||||||||
Not Done Inline Actions
Is it? Usually, extrinsic metadata is provided/validated by the forge, while intrinsic metadata is provided by any package author. So the former is more reliable. Other package loaders prefer extrinsic metadata to build release fields for this reason, so we should also do it here for consistency, unless there is a good reason to special-case Hackage. vlorentz: > The most accurate data is intrinsic
Is it?
Usually, extrinsic metadata is… | ||||||||||||
Not Done Inline ActionsBased on what I see, the extrinsic metadata for a hackage package version contains the username of the hackage account that uploaded the package while intrinsic metadata can provide the fullname of the package author. See for instance the Dish package, returned extrinsic metadata are: $ curl -H "Accept: application/json" https://hackage.haskell.org/package/Dish-0.0.0.6/revisions/ | jq [ { "number": 0, "time": "2017-11-29T13:15:29Z", "user": "zcourts" } ] while the associated cabal file contains the full author name. So I think @franckbret approach is the right one here. anlambert: Based on what I see, the extrinsic metadata for a hackage package version contains the username… | ||||||||||||
Done Inline Actionsyep the hackage extrinsic metadata are the same than intrinsic one. Everything in the hackage server is related to parse .cabal file. We could have use another api endpoint call for each version of a package as extrinsic metadata but its useless as the data is the same. By the way the endpoint that returns the most information about the package is the .cabal file itself. http -b --json https://hackage.haskell.org/package/Dish-0.0.0.6 { "author": "Courtney Robinson", "copyright": "Courtney Robinson", "description": "A group of Hash related utilities (currently wraps MurmurHash3 C implementation)", "homepage": "http://github.com/zcourts/Dish", "license": "BSD-3-Clause", "metadata_revision": 0, "synopsis": "Hash modules (currently Murmur3)" } In the hackage server everything is parsing the .cabal file. If the cabal file is not valid, one can not upload a new package or revision. See: https://github.com/haskell/hackage-server/blob/master/src/Distribution/Server/Packages/Types.hs franckbret: yep the hackage extrinsic metadata are the same than intrinsic one. Everything in the hackage… | ||||||||||||
Not Done Inline Actionsalright then vlorentz: alright then | ||||||||||||
- "" | ||||||||||||
* - maven-loader | * - maven-loader | |||||||||||
- passed as arg | - passed as arg | |||||||||||
- HEAD | - HEAD | |||||||||||
- ``release_name(version)`` | - ``release_name(version)`` | |||||||||||
- "Synthetic release for archive at {p_info.url}\n" | - "Synthetic release for archive at {p_info.url}\n" | |||||||||||
- true | - true | |||||||||||
- "" | - "" | |||||||||||
- passed as arg | - passed as arg | |||||||||||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |