-
-
Notifications
You must be signed in to change notification settings - Fork 105
Implement Migration Tool #774
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
base: develop
Are you sure you want to change the base?
Implement Migration Tool #774
Conversation
Nightly build for this pull request:
|
7f8f3ff
to
028f8de
Compare
b5f5f57
to
0122a2f
Compare
ee55039
to
e3f72ba
Compare
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.
Remaining tasks:
- Assist Rampastring.Tools to allow editing the ini files without writing the parent ini to the child Rampastring/Rampastring.Tools#15
- Don't remove the comments in an ini file
- Investigate why the message box border (not the border in DrawBorders!) in Mental Omega disappears with @SadPencil, perhaps in Auguest
- Cliam this tool is experimental and might have potential bugs even if it gets included in a stable release in xna-cncnet-client. Show a prompt that modders must backup their files and test in through after applying this migration tool and we have absolutely no warrently.
- Address the wrong usage of
string.Replace()
method that triggers a CA1806 warning
that one would be hard |
Impossible to implement with current state of Rampastring.Tools |
All right. Let's deal with the rest ones first. |
Check new implementation that removes needs to manually add every new patch in apply list. |
Just letting you know that I just merged the develop branch into this PR. You should encounter a compile error about the wrong |
.OrderBy(type => type.FullName) // Used to order patches by their names What if we released 2.12.10? Would the string be placed before Therefore, I suggest you use a list of string to store these patch class names, instead of finding and sorting them. |
It would be applied after 2.12.9 and before 2.12.11 and before latest patch. Latest patch closes the list. |
It wouldn't be applied after 2.12.9 and before 2.12.11. List<string> names = ["2.12.9-rc1", "2.12.9", "2.12.10"];
names=names.OrderBy(name=>name).ToList();
Console.Write(string.Join(", ", names)); Output:
That's why I suggest using a list of strings |
MigrationTool/Program.cs
Outdated
.ToList() | ||
.ForEach(type => | ||
{ | ||
var patch = (Patch)Activator.CreateInstance(type, arg); |
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.
Note that you need to save the patch
variable outside of the try-catch scope. patch
is always null in the catch block now.
var newPatch = CreateInstance();
patch = newPatch;
patch.Apply();
Including clientcore? What if polyfill requires a lot of dll files (like the updater in 2.12.0) |
It is a good question how to include already existed enums into migration tool. |
Just repeat the definition for now? I don't have a better way |
@Metadorius what do you think? I agree with @SadPencil to reduce numbers of libs by repeating the definitions. |
Why can't you reuse the same libs the client uses? BTW, this is one of the reasons I proposed for it to be a part of the client invoked as a command line parameter. |
Client assembly differences with libraries between different versions (like |
Do we really need to inconvenience ourselves that much because of issues of wrong binaries? IMO we would save a lot of hassle by not handling the problems with binaries. The migration tool doesn't apply 100% of the needed changes anyway, so it's not like we will lose a lot by not handling this. |
Closes #750
To Do List
Resource
folderMigration-INI.md
wrongEdit GlobalThemeSettings.ini
section