-
Notifications
You must be signed in to change notification settings - Fork 667
[2027] Perform the majority of the reorg changes #8260
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
[2027] Perform the majority of the reorg changes #8260
Conversation
|
This PR modifies commands. Please open a corresponding PR in Python Commands and include a link to this PR. |
4652273 to
e4fa5fd
Compare
e4fa5fd to
4607920
Compare
4607920 to
b5eb113
Compare
c15b5f3 to
4288a48
Compare
|
Can a summary/list of the changes in this reorg be added to the PR description or the comment? Just to make it a bit easier when updating dependent references |
4288a48 to
51d4a4b
Compare
The vscode importer does regex replacements, so if it's possible to describe the changes that way, teams wouldn't need to run a separate script. |
This performs the majority of the user facing changes listed in the reorg doc. This was performed by this script, which has more details on the process.
Whats included
This effort attempts to cover as much of the reorg spreadsheet as possible without major build system changes and without major code changes
Things covered in the script:
glasshave been moved into their new folders.hppinstead of.has noted here_cin their name was to change the file. This might be incorrect.Things NOT covered in the script, which I think are outside the scope of this initial effort
wpilibcandwpilibjinto a common project. Again, build system change, follow up PRwpiunitsproject. Again, build systemserdeproject might not bring a whole lot of benefit, so it has been left inwpiutilwith namespaces / include paths unchanged.Process
respective changes to other files, i.e. how to change C++ include paths, or
java package / import renames
1b. Additional renames are applied as per this document https://docs.google.com/spreadsheets/d/1NXgby1njo7oZ9_Ezk8q6ez5VzPTXeLAVRSnB3M1TqR4/edit?gid=1323156307#gid=1323156307
Note, some of the proposed renames require substantial build file modifications or need dependencies broken, and therefore are not covered with this script.
3-N. Apply some manual fixes, as well as run scripts like the linters, upstream utils, pregenerated files, etc
N-M. Apply namespace changes. This is a combination of automated find/replace as well as hand fixes.
An intermediate file,
refactor_layout_pp.jsonis created to track the file moves and namespace / import changes. This file can be repurposed in a simpler script to help with the upgrade process for vendors / teamsOther notes
The namespace changes were non-trivial. Since some projects (wpiutil, wpinet shared
wpi::, wpimath, wpilibc sharedfrc::) you cannot trivially do a bulk replacement and differentiate between what belongs to what new nested namespace. Furthermore, there is no consistency in C++ if files haveusing namespace XXX;vsnamespace XXX {}. Also there was no consistency between when fully qualified names were used vs non fully qualified.To address these things a couple of function / types are defined a prior to get replaced before bulk actions happen. In addition, everything, in both .cpp files and .h files will use fully qualified namespaces, regardless of the fact that they all now share a common
wpi::prefix.Some of the regex's could probably be combined / simplified / more robust, but it works for a temporary script.
The script is not intended to be located inside of
allwpilib, but I thought this would be the best way to review it.