-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support RomFS mode for SR #141
Merged
henriquegemignani
merged 1 commit into
randovania:main
from
ThanatosGit:what-am-i-doing
May 22, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
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.
Was there a specific purpose for this, I don't see?
Just to clarifiy why I had to remove it so far:
The issue here with SR is that some asset are in
asset_ids_to_copy
because they are ensured (see L338-L341).Deleting some of them doesn't work because we need to keep
_disardables.pkg
files, that would throw a key error in L396 if they are removed.So, the use case is: Ensured assets which needs to be written to the discardables.pkg
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.
ugh there was a reason. Struggling to remember why though.
What comes to mind is the need to keep things in
system.pkg
even if output being ROMFS?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.
Hmmm isn't that the same case I have in SR with keeping
_discardables.pkg
? I think, the current upstream code should also throw a key error if you ensure something into thesystem.pkg
for Dread because the lines in question here, would delete the asset from theasset_ids_to_copy
.I only see a memory save thing here? If you ensure something into a pkg but it's already written to the RomFS by this code, you don't need to write it to the pkg later again. (Of course that's only true for non
system.pkg
in dread).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.
Isn't true. That is really some piece of code :D.
The loop around it is only executed for
_modified_resources
and theif
around thedel
checks if it is in any pkg.E.g. to get a
KeyError: 15223854729795290759
in dread with current upstream MEDS, you can take a resource from a pkg, modify it and then ensure it into one of the files which still have to be written as a pkg (so in Dread onlysystem.pkg
)Leads to a
KeyError
because thedel
is executed.Though I'm not brain enough today to get the reason for the delete.
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.
Couldn't you just slap a
and if game ~= Game.SAMUS_RETURNS
instead of removing it, since it sounds like Dread does use it? I could be mistaken though and not following along.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.
That's the safety method, yeah. Guess I use it then to may not break dread by accident even I think I understood what this is doing.
The whole thing could benefit from a refactor which would be like: While iterating through modified ressources, you only want to delete from
asset_ids_to_copy
if theasset_id
is not ensured in a pkg frommodified_pkgs
.Changed the commit and also will update the PR title to be correct