Skip to content
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

Unhardcode mod package loaders #13223

Merged
merged 5 commits into from May 12, 2017
Merged

Conversation

pchote
Copy link
Member

@pchote pchote commented May 1, 2017

This updates #13171 with architectural fixes and addresses the other FileSystem hacks that were blocked on having mod-defined package loaders.

This breaks the cycling dependency between assemblies that define package loaders that contain assemblies that define package loaders that... by requiring all dlls to be loaded from a normal directory. This then also fixes @abcdefg30's SharpDevelop problems.

This is already a monster of a PR, so i'm going to defer moving all the package loaders to the mod assemblies to a future PR. I've done the D2K sound parser as a testcase, but moving any more would make it difficult to keep a clean git history while addressing any review comments.

The final commit shows that it is still possible to explicitly mount subdirectories inside zip files.

I strongly suggest reviewing this commit by commit, using the ?w=1 parameter to squash whitespace changes on the main package loader commits.

@pchote pchote added this to the Next Release milestone May 1, 2017
@pchote pchote force-pushed the mod-package-loaders branch 2 times, most recently from f72fed7 to 878960e Compare May 1, 2017 19:04
@pchote pchote mentioned this pull request May 4, 2017
Copy link
Member

@abcdefg30 abcdefg30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works, thanks! I can't review the code 100%, but it looked okay as well.

public string Name { get; private set; }
readonly Stream pkgStream;
readonly SZipFile pkg;
static readonly string[] Extensions = { ".zip", ".oramod", ".oramap" };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we dropped .oramod support, is it intentional that you keep support for that extension?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creeped back from the original PR I believe.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, fixed.

@pchote
Copy link
Member Author

pchote commented May 7, 2017

Fixed, rebased, and dropped the test commit.

@reaperrr
Copy link
Contributor

reaperrr commented May 7, 2017

and dropped the test commit.

That was a bit early, could you push a separate test branch? Because I can't get it to work locally, but I'm probably just making a mistake somewhere.

@reaperrr
Copy link
Contributor

reaperrr commented May 7, 2017

I can get ra|bits.zip to work but not ra|bits.zip/desert, neither on bleed nor here, though.

@pchote
Copy link
Member Author

pchote commented May 7, 2017

You need to do ra|bits.zip: bits and then bits|desert.

@pchote
Copy link
Member Author

pchote commented May 7, 2017

That was a bit early, could you push a separate test branch?

pchote@26eddcf

@reaperrr
Copy link
Contributor

reaperrr commented May 7, 2017

Test case works 👍

I'd still prefer either @RoosterDragon, @atlimit8 or someone else who is better than me at reviewing code to look over it before this is merged, so I won't merge this right away.

@reaperrr
Copy link
Contributor

I gave the code another look since nobody else seems to have the time or motivation, couldn't find anything that looks wrong, and in addition to the testcase all mods still seem to work fine. I assume that if there is any bug lurking that we overlooked, we'll probably run into it before the next major release, so I'll merge this now.

@reaperrr reaperrr merged commit 5e73652 into OpenRA:bleed May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants