issue-#140 Unwrapping IMPORT aliasses

Merged to the master branch
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Josef Templ »

Robert wrote:
Josef Templ wrote:I think it is time for filing a bug report, but I would be surprised.
I use a Client/Server installation every day at work, so thought I knew what to expect. It uses an altered shortcut, not a batch file.
I have now set one up here with the following properties (my paths are a little different to the Wiki example):

Name: Git BlackBox
Target: D:\BlackBox\BlackBox.exe /Use D:\Git\blackbox#140_Unwrap
Start in: D:\Git\blackbox#140_Unwrap

It (very first impression) seems to work correctly.

My batch file, modelled on the wiki, is:
start /b D:\BlackBox\BlackBox.exe /USE
It does not work correctly. It seems to be missing anything corresponding to the /Use & Start in fields of the shortcut. Is the Wiki example correct? Have I misunderstood how to use it as a model? Is my batch file correct?


On a slightly different note: If I am using Tortoise Git are the instructions on the "Git" Wiki page irrelevant to me?
You removed the dot "." at the end of the command. The end must be "/USE .".

ad Git wiki page:
Yes, all the concepts explained are also valid for TortoiseGit.
Tortoise Git is only a graphical user interface for git.

- Josef
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Josef Templ »

The build problem is caused by the compilation order, which is affected by the change.
DevReferences must be compiled before it is used by DevDebug, for example.
Edit Dev/Docu/Build-Tool.odc.
Also check in appbuild/newbbscript.txt the link order.
It must be the same as the compile order.

- Josef
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Robert »

Josef Templ wrote:Also check in appbuild/newbbscript.txt the link order.
It must be the same as the compile order.f
Config is not in the same order!
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Robert »

Modifications ready for comment and / or testing.

The diffs : http://redmine.blackboxframework.org/pr ... d9d02e31af
The zip for testing (version 730) : http://blackboxframework.org/unstable/issue-%23140/

This issue:
- Enables IMPORT aliases to be unwrapped for the Commands "Menu -> Info -> Global Variables" & "Menu -> Info -> Depandancies".
- Simplies (slightly) the total code through code reuse.

The diffs only show the last edits. It would be much more useful to compare the total changes for this issue - is that possible?
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Josef Templ »

Robert wrote:
Josef Templ wrote:Also check in appbuild/newbbscript.txt the link order.
It must be the same as the compile order.f
Config is not in the same order!
Clarification: Any partial order is correct, also for the compiler.
The rule is "Anything imported must be linked/compiled before it is used."

If you have to change the compile order by moving DevReferences in front of DevDebug,
DevReferences must also be in front of DevDebug for the linker.
Config is irrelevant.

- Josef
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Robert »

Ivan, Thanks.
Robert wrote:I don't have a nice coloured wiggly line on the "Repository" tab, which is a bit disappointing.
What I had missed was the drop-down option on this Redmine page to select different branches.

Is Krasnoyarsk really 8 hours ahead of the UK - I hadn't realised it was so much?
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Josef Templ »

I think the name "CheckModName" may be improved to express more
explicitly what it does. Currently it is misleading because it is not for
checking but for resolving module imports.
Maybe "UnwrapModName" would be better, or UnaliasModNamer, or ResolveModName,
or ResolveImport.

It should also be added to the docu of DevReferences
and to the docu wherever the unwrapping applies. Otherwise it may
surprise a user that does not know this behavior.

Just by accident I found another (unrelated) trivial bug in DevDebug.GetMod:
Kernel.ThisMod is called with a Utf8String as a parameter, which is wrong.
Instead of

Code: Select all

Strings.StringToUtf8(s.string, n, res); mod := Kernel.ThisMod(n$);
the correct code is IMHO

Code: Select all

mod := Kernel.ThisMod(s.string);
Variables res and n can be removed.

- Josef
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Zinn »

Josef Templ wrote:Maybe "UnwrapModName" would be better, or UnaliasModNamer, or ResolveModName,
or ResolveImport.
In my opinion ResolveImport is the best name.
- Helmut
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#140 Unwrapping IMPORT aliasses

Post by Josef Templ »

ResolveImport would also be my favorite.

- Josef
Post Reply