EPackageError caused by a block that is imported implicitly

I am currently participating in a Delphi XE5 project, and I ran into a problem that I could not solve. I have a Delphi project team that integrates one EXE; this exe loads several bpls at runtime dynamically. These BPLs are also part of the design team. However, when I run the application, I received the error "Project {MyProject.exe}, raised EPackageError exception class with the message" Unable to load the PumpMethod package. It contains the "FlEdit" block, which is also contained in the "eXtractionUnitMethod" package.

I already searched on SO and I found the reason. Especially Is “implicitly imported” always bad in Delphi packages? rendered a lot of help. At compile time, both BPLs of my project produce the following message:

[dcc32 Warning] PumpMethod.dpk (46): W1033 Unit 'FlEdit' implicitly imported into package 'PumpMethod'

Other:

[dcc32 Warning] eXtractionUnitMethod.dpk (46): W1033 Unit 'FlEdit' implicitly imported into package 'eXtractionUnitMethod'

But the fact is that FlEdit, a text box control that only allows floats, is already part of the installed package. This package, "Spark190.bpl", contains the control as well as the FlEdit block. I registered it and the control will appear in the toolbox. This is a project with control:

enter image description here

There is also a DclSpark190.bpl project, but it is a development-time package (contains registration of controls). When I close this project group and create a new one, I can drag and drop “My floating edit” on the form, and all this is great.

When I open a project group with EXE now and create a BPL, I received this message:

enter image description here

It seems good to me again. The Spark package (with FlEdit) is now included in the "required" list:

enter image description here

But when I compile again, "the following changes ..." will appear again. It looks abnormal to me; Is Spark BPL already on the list of requirements? So:

Q1: Why is this happening? Is this a bug in Delphi XE5? Something is wrong here?

In addition, "FlEdit", implicitly imported into the "PumpMethod" package, has still not gone away:

enter image description here

So:

Q2: I think I put FlEdit in a separate spark package. Both BPLs contain “Spark” in the list of required packages, but a warning is still displayed (W1033). What else can I do?

+5
source share

Source: https://habr.com/ru/post/1205697/


All Articles