Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the same issue can be reproduced outside UniGetUI with the relevant package manager or with the package itself, please report it there first. UniGetUI should only be used to track issues that are specific to UniGetUI's behavior or integration.
Thanks to Reece (@Reeceeboii) for the report.
When a Scoop package is created before the bucket list is known,
SourceFactory.GetSourceOrDefaulthands it a placeholderManagerSourcewith the URLhttps://devolutions.net/unigetui. Loading the sources (BaseSourceHelper._getSources) then callsFactory.Reset()andAddSourcefor each real bucket.AddSourceonly fixes the URL of a placeholder that is still in the factory, and afterReset()it is not, so packages created earlier keep the placeholder URL for good. Packages listed after the sources load are fine, which is why it only happens sometimes.The factory now remembers the placeholders it hands out, across
Reset().AddSourcealso gives the remembered placeholder the real URL, andGetSourceOrDefaultreuses the same placeholder instance after aReset()instead of creating a second one. Sources that were never placeholders are unchanged.Added
SourceFactoryTests(not gated on Windows, unlikeScoopManagerTests): one checks that a placeholder handed out beforeReset()gets the real URL fromAddSource, the other thatGetSourceOrDefaultreturns the same placeholder afterReset(). Both fail without the fix.Testing (net10.0, Linux):
dotnet test ... --filter FullyQualifiedName~SourceFactoryTests: 2 passed; 2 failed without the fix.UniGetUI.PackageEngine.Tests: the same 31 Windows/environment-specific failures as on main, nothing new.dotnet format whitespace src --folder --verify-no-changes: clean.dotnet format styleon the Avalonia slnx for the changed files: clean. The Windows slnx was not run.I reproduced this at the
SourceFactorylevel, not in the app itself on Windows.Closes #4835