widget format switched

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1683
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

widget format switched

Post by [-hh] » Thu Jan 11, 2018 1:42 am

Developing again widgets today I noticed that after a restart of LiveCode ALL my widgets that were compiled to work with LC 8 (8.1.5 and later) stopped working in LC 8.1.8-community/indy/business, pretending to have the wrong widget format.

Instead they ALL work with LC 9.0.0-dp11-community/indy/business.
I usually store the widget format as a property, so one can see that in the property inspector.
This is not very funny nor has it any advantage because I don't want to develop and work in LC 9.0.0-dp11 from several reasons.

So, what's going on?

MacOS 10.13.2.
shiftLock happens

bogs
Posts: 1762
Joined: Sat Feb 25, 2017 10:45 pm

Re: widget format switched

Post by bogs » Thu Jan 11, 2018 11:26 am

Ouch, that was a lot of stuff you had done :?
Image

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1683
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: widget format switched

Post by [-hh] » Sat Jan 13, 2018 8:52 pm

No info about that?

I refuse to call this a "bug" or a "sorry we didn't know of that"-behaviour because LC Builder has a lot of changes from LC 8.1.5 to 9.0.0 (especially with respect to script access).

Hope all others of the "1000 widgets" (K.M.) nevertheless work well with that.

I simply give up, trashed all my LC 9 versions.
shiftLock happens

bwmilby
Posts: 141
Joined: Wed Jun 07, 2017 5:37 am
Contact:

Re: widget format switched

Post by bwmilby » Sat Jan 13, 2018 11:12 pm

I can’t find it now, but I thought I saw something posted about DP11 compiling widgets from source to ensure compatibility with the current version. That probably would have been fine if they were verified to already be in the 9 series format, but I can understand your frustration.

Knowing this, I need to download everything with an old version and launch DP11 to enjoy your great widgets :wink:

My thought is that widgets need to move to engine specific folders to allow your type of environment.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3207
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: widget format switched

Post by bn » Sun Jan 14, 2018 3:38 pm

Hi Hermann,

i just tested with a relatively simple widget. I compiled and installed using LC 8.1.8.

That widget opened without problem and without recompilation in LC 8.1.5/7 LC 8.1.9 RC1 and also LC 8.2.0 DP2.
The widget was recompiled when I opened LC9 DP 11 and then it was incompatible with the LC 8.x.x series.

What I gather from this is that at least for this widget recompilation did only occur when opening it in LC 9 DPx.

I have sent you a stack that can recompile the widgets in your "extensions" folder to force recompilation using LC 8.x.x.

I also feel it is a pain to have to recompile when switching between LC 8.x.x and LC9. But I see this more as a growing pain of Livecode Builder, they probably did not change the file format without a good reason.

But recompilation where feasible in the curren LC 8.x.x series would be very welcome.

Anyone who would like to have the stack, please send me a private message, I will send it to you. I don't want to post it here because it hacks the IDE and people using it should be knowing what they are doing.

Kind regards
Bernd

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 973
Joined: Thu Apr 11, 2013 11:27 am

Re: widget format switched

Post by LCMark » Sun Jan 14, 2018 4:10 pm

@hh: Apologies for that - it was a well intended change which was aimed to make moving forward to 9 easier... However, as you noticed it has a slightly unfortunate effect if you then continue to work in 8!

I chatted to Ali about this briefly at the end of the week, but didn't get a chance to post. We came up with the idea of using a different filename for the lcm file in extensions for 9 compiled widgets from 8.

8 will likely continue to use module.lcm (nothing is going to change with regards LCB in 8, and keeping this filename means 8 does not need to change).

Then 9 will start to use module.<modver>.lcm - where <modver> is the internal binary format number. This way when 9 starts up, if there is not a machine <modver>.lcm file in the extension and there is source, it can recompile the module for 9. The IDE will then load the appropriate lcm file.

This should solve the issue you encountered *and* mean that widgets that should work in both 8 and 9 will continue to do so side-by-side.

(It also means that multi-version extensions can be distributed - they just need to contain the appropriate lcm files for the versions it supports).

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1683
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: widget format switched

Post by [-hh] » Sun Jan 14, 2018 10:51 pm

Thanks for all your answers.

The binary-version-segment (module.<modver>.lcm) will be a promising way to go.

Automatic compilation makes of course only sense for widgets that don't use new features (or don't conflict with changed settings e.g. with respect to script access).

So to avoid such an automatic compilation or even workarounds that force a recompile in previous versions, the best way will be to remove the source code from the lce.

So let us wait for the next LC 9 version. Hopefully this is again as fast with compiling a widget as until dp10. Currently, in dp11, this is 9-11 times slower than before.
shiftLock happens

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2673
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: widget format switched

Post by mwieder » Mon Feb 05, 2018 5:41 pm

I don't see why a filename change is necessary. The .lcm binary file has a signature in the first few bytes that identifies the file type and module version. All that's needed is to examine the version byte to see if it's supported, and recompile if not.

And, of course, a better solution would be to have a single binary format to avoid recompilation.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3207
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: widget format switched

Post by bn » Mon Feb 05, 2018 8:32 pm

here is a stack that helps a bit with the problem of recompiling when switching between LC 8 and LC9 DP11

It hacks the IDE on the fly, not permanently. If you close LC the script is hack gone.

It works both ways, it forces a recompile on LC 8 for LC 9 compiled community widgets and also when working in pre LC 9 DP11.

Lets hope that the hassle with this is soon over.

Kind regards
Bernd



forceRecompileWidget_2.livecode.zip
(2.37 KiB) Downloaded 15 times

Post Reply

Return to “Bug Triage”