Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Conflicting REST units while building and installing my package (FMX)


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Mar 20, 2017 10:58 AM Last Post By: Remy Lebeau (Te... Threads: [ Previous | Next ]
Robert [NL] Mit...

Posts: 78
Registered: 5/23/04
Conflicting REST units while building and installing my package (FMX)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 18, 2017 5:31 AM
Using Delphi Berlin PE Update 2

I'm rebuilding and reinstalling one of my packages (FMX framework), but now I get these strange warnings:

[dcc32 Warning] REST.JsonReflect.pas(1000): W1025 Unsupported language feature: 'class constructor'
[dcc32 Warning] REST.JsonReflect.pas(1001): W1025 Unsupported language feature: 'class destructor'
[dcc32 Warning] MyPackage.dpk(76): W1033 Unit 'REST.Consts' implicitly imported into package 'MyPackage'
[dcc32 Warning] MyPackage.dpk(76): W1033 Unit 'REST.Backend.Consts' implicitly imported into package 'MyPackage'
and so on for 19 other REST units.

And when I install I get this error (which is I guess a consequens of implicitely import REST units in my package):
Cannot load package 'RESTComponents240.' It contains unit 'REST.JsonReflect', which is also contained in package 'MyPackage'.

I do not understand why it is trying to import REST units, are those not internal Delphi units (like fmx, FireDAC and so on)?
What do I have to do to avoid importing REST?

BTW Also strange that REST.JsonReflect contains unsupported language features...
Jeff Overcash (...

Posts: 1,416
Registered: 9/23/99
Re: Conflicting REST units while building and installing my package (FMX)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 18, 2017 11:04 AM   in response to: Robert [NL] Mit... in response to: Robert [NL] Mit...
Robert [NL] Mittendorff wrote:
Using Delphi Berlin PE Update 2

I'm rebuilding and reinstalling one of my packages (FMX framework), but now I get these strange warnings:

[dcc32 Warning] REST.JsonReflect.pas(1000): W1025 Unsupported language feature: 'class constructor'
[dcc32 Warning] REST.JsonReflect.pas(1001): W1025 Unsupported language feature: 'class destructor'
[dcc32 Warning] MyPackage.dpk(76): W1033 Unit 'REST.Consts' implicitly imported into package 'MyPackage'
[dcc32 Warning] MyPackage.dpk(76): W1033 Unit 'REST.Backend.Consts' implicitly imported into package 'MyPackage'
and so on for 19 other REST units.

And when I install I get this error (which is I guess a consequens of implicitely import REST units in my package):
Cannot load package 'RESTComponents240.' It contains unit 'REST.JsonReflect', which is also contained in package 'MyPackage'.

I do not understand why it is trying to import REST units, are those not internal Delphi units (like fmx, FireDAC and so on)?
What do I have to do to avoid importing REST?

BTW Also strange that REST.JsonReflect contains unsupported language features...

Your package should require RESTComponents. since it doesn't it is implicitly
linking in those units, but you can't install it since they are already
installed in a different package (RESTComponents240). Note you don't add the
240 to the package name when you add it to the requires list.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Remy Lebeau (Te...


Posts: 8,722
Registered: 12/23/01
Re: Conflicting REST units while building and installing my package (FMX)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 20, 2017 10:58 AM   in response to: Robert [NL] Mit... in response to: Robert [NL] Mit...
Robert wrote:

[dcc32 Warning] REST.JsonReflect.pas(1000): W1025 Unsupported language
feature: 'class constructor'

[dcc32 Warning] REST.JsonReflect.pas(1001): W1025 Unsupported language
feature: 'class destructor'

Do you have your package configured to output C++Builder files? Those Delphi
features are not available in C++.

[dcc32 Warning] MyPackage.dpk(76): W1033 Unit 'REST.Consts' implicitly
imported into package 'MyPackage'

[dcc32 Warning] MyPackage.dpk(76): W1033 Unit 'REST.Backend.Consts'
implicitly imported into package 'MyPackage'

and so on for 19 other REST units.

Your package is using things from the REST package (or is using other things
that themselves internally refer to the REST units), but the REST package
is not listed in your package's 'requires' list, so it gets imported implicitly.

And when I install I get this error (which is I guess a consequens of
implicitely import REST units in my package):

Cannot load package 'RESTComponents240.' It contains unit
'REST.JsonReflect', which is also contained in package 'MyPackage'.

That means your package has directly compiled the 'REST.JsonReflect' unit
into itself, rather than import it from the REST package. A Delphi unit
cannot co-exist in two separate packages that are loaded at the same time.

I do not understand why it is trying to import REST units, are those
not internal Delphi units (like fmx, FireDAC and so on)?

Something in your package is relying on something that refers to the REST
units.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02