You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basic goal: make it more type safe to convert between the raw input without complete package information and the fully resolved versions of packages:
-- Same idea for SnapshotLocation and SnapshotLayercompletePackageLocation::RawPackageLocationImmutable->mPackageLocationImmutabledataPackageLocation=PLImmutable!PackageLocationImmutable
| PLMutable!(ResolvedPathDir)
dataPackageLocationImmutable=PLIHackage!PackageIdentifier!CabalFileHash!TreeKey
| PLIArchive!Archive!PackageMetadata
| PLIRepo!Repo!PackageMetadatadataRawPackageLocationImmutable=RPLIHackage!PackageName!RawVersion!(MaybeTreeKey)
| RPLIArchive!RawArchive!RawPackageMetadata
| RPLIRepo!RawRepo!RawPackageMetadatadataRawVersion=RVLatestAll
| RVLatestRevision!Version
| RVRevisionNumber!Version!Revision
| RVRevisionHash!Version!CabalFileHashdataPackageMetadata=PackageMetadata{pmIdent::!PackageIdentifier
, pmTreeKey::!TreeKey
, pmCabal::!BlobKey}dataRawPackageMetadata=RawPackageMetadata{rpmName::!(MaybePackageName)
--^ Package name in the cabal file---- @since 0.1.0.0
, rpmVersion::!(MaybeVersion)
--^ Package version in the cabal file---- @since 0.1.0.0
, rpmTreeKey::!(MaybeTreeKey)
--^ Tree key of the loaded up package---- @since 0.1.0.0
, rpmCabal::!(MaybeBlobKey)
--^ Blob key containing the cabal file---- @since 0.1.0.0}
Regarding that note: once we have lock files in place, the lack of full reproducibility in a stack.yaml file isn't a problem anymore, since the lock file itself is the intended guarantee of reproducibility.
Is this getting large enough that you want to back out of the change?
Activity
qrilka commentedon Nov 27, 2018
@snoyberg this refactoring appears to be larger than I expected it to be, I think as the 1st step I will just use RawXXX in Stack and then we could use proper types but for that some number of details need to get resolved, e.g. see this note - https://github.com/commercialhaskell/stack/blob/master/src/Stack/Build/Target.hs#L340
snoyberg commentedon Nov 27, 2018
Regarding that note: once we have lock files in place, the lack of full reproducibility in a stack.yaml file isn't a problem anymore, since the lock file itself is the intended guarantee of reproducibility.
Is this getting large enough that you want to back out of the change?
qrilka commentedon Nov 27, 2018
The current diff is
It's almost ready and on Stack side it uses previous "Raw" types at the moment, I didn't go into changing logic
snoyberg commentedon Feb 6, 2019
Completed via PR by @psibi