5 Sep 2024 |
K900 | But I'm not sure about that | 07:09:12 |
K900 | Because having two store paths with the same qrc name but different versions installed at the same time is not that unlikely | 07:09:39 |
outfoxxed | I think it should be implemented in the load/store functions as late as possible to avoid touching any internal structures that are more likely to change | 07:09:40 |
outfoxxed | just add a header with the store path | 07:09:56 |
outfoxxed | and theres no risk of reading corrupt old caches because caching was disabled | 07:10:27 |
outfoxxed | Also we should only do this for applications located in the nix store | 07:11:19 |
outfoxxed | What might work well here is to reuse the version field that the qml engine already stores with the cache and set it to max(whatever int type) to signify it has an extra header | 07:13:52 |
outfoxxed | so it will be discarded if its somehow loaded in non-store mode | 07:14:12 |
outfoxxed | its a uint32, we have plenty of headroom on the version number | 07:15:55 |
K900 | I don't know about that | 07:16:57 |
outfoxxed | do you have a better idea? | 07:17:07 |
K900 | I don't want to mess with the internals any more than absolutely necessary | 07:17:35 |
K900 | Maybe we should talk to Qt upstream and see what they think | 07:17:49 |
outfoxxed | I don't either but I also don't want hundreds of outdated cache files | 07:17:53 |
outfoxxed | yeah thats probably a good idea | 07:18:03 |
outfoxxed | I'll mention it | 07:18:30 |
outfoxxed | looking through the load/store code its pretty integrated | 07:21:56 |
outfoxxed | probably less of a good idea than I hoped | 07:22:13 |
K900 | I'm also putting some notes on the PR | 07:26:06 |
outfoxxed | What do you think of hashing the application and qtdeclarative versions together and putting them in qml_compile_hash | 07:27:33 |
outfoxxed | thats a 48 character space usually used for just the qtdeclarative version | 07:27:49 |
outfoxxed | and already embedded in the qmlc | 07:27:57 |
outfoxxed | we can use one or more bytes to signify it should be read as a hash of both and compared as such | 07:28:31 |
outfoxxed | worst case scenario some application not running from the nix store gets a cache miss | 07:28:53 |
K900 | I think I need to reread the cache cleaning code | 07:31:35 |
K900 | Because I am very confused on how it's intended to work | 07:31:44 |
outfoxxed | qv4executablecompilationunit.cpp | 07:31:54 |
outfoxxed | ExecutableCompilationUnit::verifyHeader | 07:32:01 |
outfoxxed | my proposal is to check for a proefix on unit->libraryVersionHash, and if present handle the following bytes as a hash of QML_COMPILE_HASH and the application's store path | 07:33:13 |
outfoxxed | * my proposal is to check for a prefix on unit->libraryVersionHash, and if present handle the following bytes as a hash of QML_COMPILE_HASH and the application's store path | 07:33:26 |