-
Notifications
You must be signed in to change notification settings - Fork 92
Extract fileystem API (fs-api) and simulated file system (fs-sim) from ouroboros-consensus and ouroboros-consensus-test.
#4425
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
Conversation
e02047d to
5865d7f
Compare
| fsVar <- uncheckedNewTVarM mockFS | ||
| errorsVar <- uncheckedNewTVarM errors | ||
| fsVar <- newTVarIO mockFS | ||
| errorsVar <- newTVarIO errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uncheckedNewTVarM is just an alias for newTVarIO
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage.hs
Outdated
Show resolved
Hide resolved
jasagredo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! thanks!
51c955e to
3f09e91
Compare
|
Related to #4082. |
dnadales
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great Joris 💪
ouroboros-consensus-test/test-storage/Test/Ouroboros/Storage.hs
Outdated
Show resolved
Hide resolved
dbe8eed to
fff21ff
Compare
|
@jasagredo @dnadales I've added a new commit that leaves behind deprecation warnings in the old locations of the |
9891d03 to
d05d476
Compare
The `fs-api` package contains the `HasFS` interface to the file system, and it provides the `HasFS` implementation for the `IO` file system. The `fs-sim` package contains the `HasFS` implementation for a simulated file system, together with some test utilities. We'll have to investigate whether the test utilities should live in a separate lib. Some utility modules from `ouroboros-consensus` are copied into the packages and adapated, because we can not depend on `ouroboros-consensus`, since that would introduce circular dependencies. In some other cases where dependencies on definitions from utility modules were only minor, those definitions were inlined or copied from the utility modules into the `fs-api` and `fs-sim` code. This commit removes the core `fs-api` and `fs-sim` from `ouroboros-consensus` and `ourobors-consensus-test`, but does not yet fix the compilation errors that arise in the `ouroboros-consensus*` packages. A future commit should make the `ouroboros-consensus-*` packages depend on `fs-api` and `fs-sim`, and fix the all the compilation errors.
098af5d to
d7430e5
Compare
d7430e5 to
bf768fd
Compare
|
bors r+ |
Description
Part of #4082.
This PR extracts the filesystem API and simulated filesystem from the the
ouroboros-consensusandouroboros-consensus-testpackages. The packages are calledfs-apiandfs-simrespectively. This PR paves the way for publishing bothfs-apiandfs-simon CHaP and Hackage.See the commit messages for more info about the changes introduced by this PR.
Follow-up PRs:
nothunks(and possiblydeepseq) dependencies fromfs-apiandfs-sim.System.IO.Seekfromfs-apifs-apiandfs-simtocardano-fs-apiandcardano-fs-simrespectively for releases to CHaP.io-simbe exposed? In a separate package?fs-simandfs-api.fs-simandfs-api.fs-apiandfs-simin a top-level module likeSystem.FSandSystem.FS.Sim.System.FS.Typestofs-apimodules.Checklist
changelog.ddirectory created usingscriv. If in doubt, see the Consensus release process.DEPRECATEDwarning that notifies downstream consumers.interface-CHANGELOG.md