upgrade to VS 2019 : retarget a whole history of changes ?

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
binbinhfr
Posts: 8
Joined: May 9th, 2019, 10:57 pm

upgrade to VS 2019 : retarget a whole history of changes ?

Post by binbinhfr » May 13th, 2019, 11:03 pm

Hi,

I'm new to VS C++ and to this forum and installed VS2019 to study all this shiiiiiiiit (I try to speak the chili's way... ;-) ).
Each time I clone a chili repo and open a solution, I have to retarget to the latest SDK (10.x) and latest platform (v142). I then commit this little change, and only then I can build the product.

But the past timeline/history is still in outdated.
So if I want to go back in the timeline and branch in the past to follow chili's progression in the tutorial, I have to repeat the same retargeting sequence everytime, which is tedious.

I wonder if there is a way to retarget from the beginning of the commits history, and not only at the end ?

I can see different solutions but I don't know if they are doable :
- insert a retargeting commit at the beginning of the history ? Is it possible ?
- moving the retargeting commit that I made, from the end to the beginning of the commits history ?
- manage to edit the project file that is stored in the first commit of the history ? But will it then impact all other commits ?

I am sure that some experts around here have a solution for that "upgrade" case that must appear on your repos everytime Windows SDK goes 1 version up.... ;-)

albinopapa
Posts: 3709
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: upgrade to VS 2019 : retarget a whole history of changes ?

Post by albinopapa » May 14th, 2019, 2:40 am

Because I don't think you can propagate a change from an earlier commit through later commits...kind of defeats the purpose of source control if you ask me, but I could be wrong, here's what I would do:

Create a branch at the earliest commit I was wanting to checkout, setup how you want ( SDK, language version, etc... ), then branch off from that one whenever you want to start something new.

If you want to, you could even merge later commits from the master branch to the new branch which is about as close as you are going to get I believe.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

albinopapa
Posts: 3709
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: upgrade to VS 2019 : retarget a whole history of changes ?

Post by albinopapa » May 14th, 2019, 2:58 am

Come to think of it, yeah, create a branch from some earlier commit...even the initial commit. This will be your base. Create a branch from the new base branch, this will be your working branch. Go back to the master ( chili's version ) branch and create a branch from there. Now merge from the newly created branch to your working branch. When I tried this, it asked me to resolve a conflict, which as the vcxproj file and this is where VS stores which SDK is chosen. You want to keep the newer version. Now, write a commit message and commit your merge.

So, either way, there is a process to go through to make changes from the past and carry forward, but it seems more straight forward to just change the SDK each time.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

binbinhfr
Posts: 8
Joined: May 9th, 2019, 10:57 pm

Re: upgrade to VS 2019 : retarget a whole history of changes ?

Post by binbinhfr » May 14th, 2019, 9:57 am

Thx for your answer ;) . Well I tried to do what you said, but I must have missed something... (my english is maybe faulty)
Example using the chili-snek-repos:
I clone the repo. I look at the history changes and I branch the 2nd one into "init-upgrade". On this branch, I edit the project file to upgrade SDK and platform. I can then build for test. I commit.
Then I go back to master branch as you told, but then I don't understand where you want me to create another branch ? On the first changes also, or at the end of the timeline ? And what should be th order of the merge ?
Remember what I want : at the end of the process, I would like to be able to branch from any point of the history of changes and build without editing any outdated project...

albinopapa
Posts: 3709
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: upgrade to VS 2019 : retarget a whole history of changes ?

Post by albinopapa » May 14th, 2019, 7:03 pm

Well, the issue is the SDK version and the other properties are all part of the commit history. So each commit would have the SDK version set for 8.1 and the Platform set to VS2015.

Probably the easiest ways to handle the situation would be to download the Win8.1 SDK and VS2015 build tools through the VS2019 installer if they are still options. This way you wouldn't have to make any changes to earlier commits.

I'm going to say, as far as I know, there isn't a way of making a change to an earlier commit and have it propagate through the later commits.

Even if you go through the process I had described, there is one issue, you have to keep your Engine.vcxproj and ignore changes to that file each time you merge in order to keep from having to update the properties, however, this file also keeps track of what headers and source files are a part of the project ( to show in the Solution Explorer window ) so when files are added to the project and you ignore this vcxproj file, you'll end up needing to add those new headers and source files back into the Solution Explorer window yourself.

Hmm, either install the earlier SDK and build tools or deal with having to change the properties manually or deal with the last issue I mentioned.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

binbinhfr
Posts: 8
Joined: May 9th, 2019, 10:57 pm

Re: upgrade to VS 2019 : retarget a whole history of changes ?

Post by binbinhfr » May 14th, 2019, 8:50 pm

ok, I understand. Thx for your time.
I checked VS2019 installer, and the 8.1 SDK is not available, only several 10.x versions.
But I'll try to install it manually from here : https://developer.microsoft.com/en-us/w ... dk-archive

User avatar
chili
Site Admin
Posts: 3808
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: upgrade to VS 2019 : retarget a whole history of changes ?

Post by chili » May 15th, 2019, 4:40 pm

Here is what you do. You go to the earliest commit with the project files in it. Create a branch there, retarget and commit. Then switch to the master branch and rebase onto your retargeted branch. This will replay all the master commits on top of the commit in which the solution has already been retargetted.
Chili

binbinhfr
Posts: 8
Joined: May 9th, 2019, 10:57 pm

Re: upgrade to VS 2019 : retarget a whole history of changes ?

Post by binbinhfr » May 16th, 2019, 11:05 pm

yes thx chili. A friend of mine gave me the same advice and it works.
But he also confirmed that the easiest way was to install SDK8.1 and v140 platform.
Now I just have to cancel the retarget proposition when I clone one of your repo, and everything works fine.
But this GIT tool is really huge. I wish I had that 25 years ago, but it was created in 2005.... :-(

EDIT : different subject : the forum does not seem to send me any mail to notify me of a new post to a subscribed subject, despite I checked every mail options in my "edit notifications options" menu. I still have notifications when I log into the forum, showing that the subscriptions are ok, but no mail at all...

User avatar
chili
Site Admin
Posts: 3808
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: upgrade to VS 2019 : retarget a whole history of changes ?

Post by chili » May 19th, 2019, 7:14 am

Yeah, I think I need to change the outgoing email settings :(
Chili

binbinhfr
Posts: 8
Joined: May 9th, 2019, 10:57 pm

Re: upgrade to VS 2019 : retarget a whole history of changes ?

Post by binbinhfr » May 19th, 2019, 5:04 pm

chili wrote:
May 19th, 2019, 7:14 am
Yeah, I think I need to change the outgoing email settings :(
yes,still did not receive any email notification about your last answer...

Post Reply