Hi all,
I’m new to Xojo and have to take over an existing quite big project.
First step I did was to save the project as text to manage it on Github for source versioning
I noticed that source files are updated by the IDE to add/update whitespace, making source diff very difficult.
Here is an extract of source diff from Github Desktop to illustrate:
No, this is the result of automatic IDE behaviour when I save the project.
The screenshot is just an extract of a very long file (56k lines) and it’s like this for the whole file.
Not that I’m aware of. I’ve not known a version of the IDE that didn’t indent everything that was inside a loop or conditional (if, case etc). That’s what this looks like. If you are just saving this in text format now, how did the existing version get into git in the first place?
You could do a find and replace for “\n\t\n” and replace with “\n\n” in something like BBEdit (across all files), however you will find that double nested items are “\n\t\t\n” so it becomes more of an issue. Equally you will end up doing that for every single version you ever save. I would just take the hit this time and have things easy from now on.
The good news is if you just accept everything it is unlikely ever to happen again.
The thing we need to know is what version of the IDE was the project last edited in and what are you using now because if they’re nott the same, you will see things like this as bugs in the IDEs save routines were fixed over time. For instance, a few annoying bugs were fixed last year which make the IDE only save things that were actually changed by the user.
Thanks for the info,
I don’t know about the xojo version last used to save the project (it was a binary project until now).
And I’m using the last xojo version from now on (version 2022 release 1)
Ok I think I understand what happened.
It was my mistake, I used Visual Studio Code to search code (for conveniency, much faster than using the IDE cause the project is big, I will have to dig into optimizing it, I already noticed there are 6843 warning in the project…).
But VSC had specific indent param making all the changes I was talking about.
So Xojo had nothing to do with it.
I’m sorry for the inconvenience and thank you all for taking the time.
Don’t think about warnings as “you’ve got to fix this right now”.
Now that the API 2 transition is done, it’s likely going to be a long time before any of those warnings become something that you need to take care of. One of the misconceptions that many users have is that they need to clear that list right away, when the reality is that the deprecated items for API 2 will likely never go away, because API 1 is heavily used in the IDE itself and the risk of introducing critical bugs by transitioning is just too high.
Something else to keep in mind… if you do start to transition the project to API 2, do it in a branch. it is very likely that a project of that size will not be buildable for a period of time while you work out the issues… and keep a close eye on the things that now have a zero-based index that used to be 1-based. Things like Mid => Middle.
Having said that, the project does not have a lot of deprecated warnings, more:
“Unused method parameters”
“Unused local variables”
“Unused event parameters”
And I read somewhere that getting rid of those can improve compilation time, can you confirm ?