Page 1 of 1

change from v1 to v2 - is it possible to get a whole list of all errors?

Posted: 23 Oct 2020, 05:39
by Taurus
Hi,

I am starting to change my >10.000 lines scripts from v1 to v2. Is it possible to get a whole list of all errors?

At the moment i click on debug and get 1 error after another. But i can't change the "..., % var . var", because it will break v1 and i still have to dev on.

I am using https://www.autohotkey.com/boards/viewtopic.php?f=37&t=29689&p=210818#p210818 to get the switch easier.

Any idea/help? ;)

Re: change from v1 to v2 - is it possible to get a whole list of all errors?

Posted: 23 Oct 2020, 06:01
by guest3456
you can try this, its old and definitely not up to date, but can maybe save some time:

https://www.autohotkey.com/boards/viewtopic.php?t=25100

actually i think that converter still uses the old command syntax, and now in v2 its all functions just without the parens() and so all params are expression params. who knows i forget what v2 does anymore
Taurus wrote:
23 Oct 2020, 05:39
Any idea/help? ;)
otherwise, only other idea i have is to just stick with v1. i'm not sure v2 will ever be officially released and its just not worth the headache if you have a big script with ongoing maintenance, because you could devote weeks to converting to v2 right now, and then next month everything breaks again when v2 changes again

Re: change from v1 to v2 - is it possible to get a whole list of all errors?

Posted: 23 Oct 2020, 06:33
by SOTE
Taurus wrote:
23 Oct 2020, 05:39
I am starting to change my >10.000 lines scripts from v1 to v2.
But why would you want to convert such a long script from v1 to v2 to begin with? Seems like it would be more trouble than it's worth. If the script is running fine as v1, then arguably better to leave it be. If you are so interested in v2, then perhaps you write new scripts with it, versus converting very long v1 scripts. Also, as mentioned by guest3456, v2 is still alpha and experimental. Writing anything in v2 outside of experimental use, can cause massive problems. A person shouldn't be using v2 for any serious scripts that must be relied upon for work or their business.

Re: change from v1 to v2 - is it possible to get a whole list of all errors?

Posted: 09 Nov 2020, 04:09
by swagfag
it will break v1 and i still have to dev on.
probably unfeasible. possibly feasible if u very carefully modularize/rewrite ur app to only use classes with basic functionality(ie no v1-specific metafunctions/class hierarchy type stuff)
at the end of the day ud still have to change all gui parts/hotkeys in one fell swoop, so i dont know if its even worth trying

Re: change from v1 to v2 - is it possible to get a whole list of all errors?

Posted: 13 Nov 2020, 07:22
by nnnik
If there was a variable %A_AhkMajorVersion% or similar like I suggested and made pull requests for you could include different libraries depending on your version.
This would possibly allow the community to create gui libraries that work independently from a version number.
However lexikos seems to prefer alternative ideas.

Re: change from v1 to v2 - is it possible to get a whole list of all errors?

Posted: 16 Nov 2020, 16:32
by Tigerlily
@Taurus

I did this with a pretty large script about the same size as yours. It wasn't an insanely complex script, but still had a lot of things that needed to be completely switched to v2 and wasn't basic. It would have been nice to have what you are talking about, however I just went one line at a time fixing each error as I switched it.

Sometimes this will send you down a giant rabbit hole of errors that actually need to have one thing changed not related to the error itself. After doing this successfully and porting the entire script, It helped me understand how to port scripts better from v1 to v2, which is really what you need to understand instead of having every error be read out.

Read everything here and here and it these resources will help you debug much easier and have a more seamless porting experience.

Re: change from v1 to v2 - is it possible to get a whole list of all errors?

Posted: 28 Dec 2020, 19:12
by hyaray
My script may be even bigger, I also want to convert, I'm using v2 a102,
especially after v104, the syntax has changed a lot.