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
let's say my package does some data fetching and processing and then exposes it to the user.
It uses the sratch space to hold the processed data, so it doesn't redownload it.
Now lets say different versions of my package does different processing.
So you don't want to use a file that was processed by v1 of the package with v6 because .e.g. we have changed from representing time as a DateTime to using a ZonedDateTime.
So it should redownload the file.
So keying a subfolder to the version gets us some of that.
but there are some problems
Deleting
So this could be quite a lot of data stored in the v1 sub-folder.
and it would be good if it was deleted when uninstalled v1 of the package.
For this we kind of need the package manager to know about the folder
clear_scratchspaces!(pkg) is a decent approximation for a lot of use cases
Compatibility
Consider a more advanced version of the above.
What if while between v1 and v6 the time representation changed, but some files don't actually have any time data, so actaully remain compatiable.
The way we (Invenia) have solved this before is by giving seperate version numbers to the Data and the the Program, and then having the Program declare which versions of the data is is happy to use via semver_spec.
You can see one used of this in JLSO which declared which file versions it can read and which it can write.
We have a more intense version of this for interally with some datadeps.
So if both the scratch (sub)-space and the package have seperate versions, the package just declares which versions it can work with and then goes and find the newest that exists right now meeting that semver_spec it said it could work with.
You can do this at the function level.
(pretty much what our internal project on datadeps does)
But it would be cooler if the package manager was aware of it, so that it could tie in to automatic deleting
The text was updated successfully, but these errors were encountered:
Wouldn't the second more advanced example be solved if you just wrap the data in a thinner package of its own?
Then the processing package depends on the data package, and you get all the semver compat stuff from Pkg automatically.
I would also like this feature, I have a compiler that I'm writing a caching mechanism for, and it doesn't really make sense to keep the compiled code for v0.4 when we are using v0.5 of the compiler now.
I don't think this is important stuff, but just noting them down.
Consider the instructions for making scratch spaces that are keyed to the version.
This is kind of limitted
let's say my package does some data fetching and processing and then exposes it to the user.
It uses the sratch space to hold the processed data, so it doesn't redownload it.
Now lets say different versions of my package does different processing.
So you don't want to use a file that was processed by v1 of the package with v6 because .e.g. we have changed from representing time as a
DateTime
to using aZonedDateTime
.So it should redownload the file.
So keying a subfolder to the version gets us some of that.
but there are some problems
Deleting
So this could be quite a lot of data stored in the v1 sub-folder.
and it would be good if it was deleted when uninstalled v1 of the package.
For this we kind of need the package manager to know about the folder
clear_scratchspaces!(pkg)
is a decent approximation for a lot of use casesCompatibility
Consider a more advanced version of the above.
What if while between v1 and v6 the time representation changed, but some files don't actually have any time data, so actaully remain compatiable.
The way we (Invenia) have solved this before is by giving seperate version numbers to the Data and the the Program, and then having the Program declare which versions of the data is is happy to use via
semver_spec
.You can see one used of this in JLSO which declared which file versions it can read and which it can write.
We have a more intense version of this for interally with some datadeps.
So if both the scratch (sub)-space and the package have seperate versions, the package just declares which versions it can work with and then goes and find the newest that exists right now meeting that semver_spec it said it could work with.
You can do this at the function level.
(pretty much what our internal project on datadeps does)
But it would be cooler if the package manager was aware of it, so that it could tie in to automatic deleting
The text was updated successfully, but these errors were encountered: