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
Currently I'm using this SQLite query to return the list of packages sorted by the latest version, and it works for a few packages but not all. For example, it works for guinget but not Adopt OpenJDK. Seems like the latest version added is what shows up in guinget as the "latest version", but I can't easily verify that. Once it's ready to load the package list into the data grid view, it compares the version and latest version to see if it should add the package to the list. There's one column that's usually hidden that's used to store the "latest version" and you can show it through the Designer for debugging, if you wish.
"SELECT DISTINCT
ids.id, manifest.id, versions.version, manifest.version, names.name, manifest.name,
LAST_VALUE ( versions.version ) OVER (
PARTITION by ids.id
ORDER BY ids.id
RANGE BETWEEN UNBOUNDED PRECEDING AND
UNBOUNDED FOLLOWING
) AS NewestVersion
FROM
ids, manifest, versions, names
WHERE
manifest.id = ids._rowid_ and manifest.version = versions._rowid_ and manifest.name = names._rowid_;"
This was copied from PackageListTools.vb in the GetPackageDetailsTableFromSqliteDB function.
Displaying the latest version can be done by using the latest build from the main branch (either from AppVeyor or by building manually) and by turning on the Load package list from SQLite database and Display latest package versions experimental settings (may have different text; it's been a while since looking) in Tools>Options>Experimental after showing hidden controls by clicking in the bottom-left corner of the About window. Once turned on, just refresh the cache and it'll load what it thinks is the latest version of each package.
I think what's going on is I'm using the wrong query. Tried to read winget's code for this, but it's not all in one place and I don't know C++, so I couldn't figure it out from there. Also tried looking at what Winstall does, but I couldn't find an SQLite query example in there. Did find some code where it moves versions into higher spots or something, but that didn't really have an easy way to apply to this.
The text was updated successfully, but these errors were encountered:
An update on this: looks like Microsoft fixed the AdoptOpenJDK package versions but another package that had something to do with subtitles now shows the wrong version number in guinget as the "latest" one.
Edit: Looks like Adopt OpenJDK is back to saying the latest is 8.x and the other package is correct. If I understood how to use the version comparison thing like in winget's utility DLL, I'd use it.
Latest status on this issue: Adopt OpenJDK appears to now be split into separate packages for each version, so that shouldn't be an issue anymore. Unfortunately, 7zip now suffers from the "old version showing as the latest" issue, so I still can't have that setting be on by default yet. I really need to get the version selector window working so that people can remove duplicated entries but still install the latest version of an application even if the version displayed as the latest isn't correct.
Currently I'm using this SQLite query to return the list of packages sorted by the latest version, and it works for a few packages but not all. For example, it works for guinget but not Adopt OpenJDK. Seems like the latest version added is what shows up in guinget as the "latest version", but I can't easily verify that. Once it's ready to load the package list into the data grid view, it compares the version and latest version to see if it should add the package to the list. There's one column that's usually hidden that's used to store the "latest version" and you can show it through the Designer for debugging, if you wish.
This was copied from PackageListTools.vb in the
GetPackageDetailsTableFromSqliteDB
function.Displaying the latest version can be done by using the latest build from the main branch (either from AppVeyor or by building manually) and by turning on the
Load package list from SQLite database
andDisplay latest package versions
experimental settings (may have different text; it's been a while since looking) inTools>Options>Experimental
after showing hidden controls by clicking in the bottom-left corner of theAbout
window. Once turned on, just refresh the cache and it'll load what it thinks is the latest version of each package.I think what's going on is I'm using the wrong query. Tried to read winget's code for this, but it's not all in one place and I don't know C++, so I couldn't figure it out from there. Also tried looking at what Winstall does, but I couldn't find an SQLite query example in there. Did find some code where it moves versions into higher spots or something, but that didn't really have an easy way to apply to this.
The text was updated successfully, but these errors were encountered: