Here's one for the archives: Incompatible argument list error with a compiled component

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Here's one for the archives: Incompatible argument list error with a compiled component

4D Tech mailing list
For those of you following my tedious reports on components, the latest
chapter!

I've consolidated my two components into one because, well, it's a whole
lot easier that way. I'm putting that into a host database where it makes
life simpler. Instead of my zillions of methods, you see just a few.

But then I compile. And I get this sort of error:

           The argument list for the method named 'ValueCheck_LongintRange'
           in the component "MessageHub" is incompatible with the database
           "MessageHubDemo.4DB"

Hmm. No it isn't. I got this error from a few methods, seemingly randomly.
I tried:

* Rebuilding all of the constants in both systems.

* Double-checking all calls.

* Various other bits of voodoo. (Retokenize all methods, compile with
different options, throw salt over my left shoulder, light a candle to Alan
Turing, etc.)

* All with constant quit-reopen-recompile-build-quit cycles to be sure
nothing weird was hanging around.

No dice. Finally, I tried generating a typing file over in the source of
the component and...there's an extra parameter. I'm not using that
parameter, I'm not declaring that parameter (with all vars typed)...but the
Compiler thinks it exists. No idea why. I've declared the phantom parameter
and now things work. Weird.

A note: You can also get this error for good reason. Like, for example,
you've got a bad parameter list in your host! In other words, this is a
useful error that may be 100% accurate. But when it isn't look for the
weird thing that I noticed.

P.S. It would make more sense for the compiler to detect this when
compiling the host rather than having it only appear when you try to open
the compiled host.

P.P.S. It would be better if the compiler would detect bad argument lists
(too long, for example) all of the time. This feature request still needs
more love:

Compiler/Typing Improvements: Detect some runtime errors in advance
http://forums.4d.fr/Post/EN/19107688/1/19107689

Even if you don't care, vote for it for the sake  of your brothers and
sisters who do. We'll owe you one!

P.P.P.S. Is it just me, or is there something going on with the compiler?
I'm in 16.1 and I keep noticing errors that the compiler isn't finding.
Hard to reproduce, but I'm noticing it a lot. The compiler has gotten
stricter in recent versions (good!), so I hope I'm imagining something here.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Here's one for the archives: Incompatible argument list error with a compiled component

4D Tech mailing list
Hi Dave,

Yeah, something seems squirrely with the v16 compiler. I just posted about
an error on a component which compiles fine in 15r5, but now generates a
"4d method and variable with same name" error (and of course you can't find
out the name of said conflict, which btw does not exist in reviewing all
code and variable names). Oh and generating typing in this component
crashes 4D

Not nice

On Mon, May 15, 2017 at 6:22 PM, David Adams via 4D_Tech <
[hidden email]> wrote:

> For those of you following my tedious reports on components, the latest
> chapter!
>
> I've consolidated my two components into one because, well, it's a whole
> lot easier that way. I'm putting that into a host database where it makes
> life simpler. Instead of my zillions of methods, you see just a few.
>
> But then I compile. And I get this sort of error:
>
>            The argument list for the method named 'ValueCheck_LongintRange'
>            in the component "MessageHub" is incompatible with the database
>            "MessageHubDemo.4DB"
>
> Hmm. No it isn't. I got this error from a few methods, seemingly randomly.
> I tried:
>
> * Rebuilding all of the constants in both systems.
>
> * Double-checking all calls.
>
> * Various other bits of voodoo. (Retokenize all methods, compile with
> different options, throw salt over my left shoulder, light a candle to Alan
> Turing, etc.)
>
> * All with constant quit-reopen-recompile-build-quit cycles to be sure
> nothing weird was hanging around.
>
> No dice. Finally, I tried generating a typing file over in the source of
> the component and...there's an extra parameter. I'm not using that
> parameter, I'm not declaring that parameter (with all vars typed)...but the
> Compiler thinks it exists. No idea why. I've declared the phantom parameter
> and now things work. Weird.
>
> A note: You can also get this error for good reason. Like, for example,
> you've got a bad parameter list in your host! In other words, this is a
> useful error that may be 100% accurate. But when it isn't look for the
> weird thing that I noticed.
>
> P.S. It would make more sense for the compiler to detect this when
> compiling the host rather than having it only appear when you try to open
> the compiled host.
>
> P.P.S. It would be better if the compiler would detect bad argument lists
> (too long, for example) all of the time. This feature request still needs
> more love:
>
> Compiler/Typing Improvements: Detect some runtime errors in advance
> http://forums.4d.fr/Post/EN/19107688/1/19107689
>
> Even if you don't care, vote for it for the sake  of your brothers and
> sisters who do. We'll owe you one!
>
> P.P.P.S. Is it just me, or is there something going on with the compiler?
> I'm in 16.1 and I keep noticing errors that the compiler isn't finding.
> Hard to reproduce, but I'm noticing it a lot. The compiler has gotten
> stricter in recent versions (good!), so I hope I'm imagining something
> here.
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************




--
Bob Finnerty
Exodus Software
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Loading...