Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes Package.Class.cls class gets created #4

Closed
eduard93 opened this issue Nov 27, 2017 · 14 comments
Closed

Sometimes Package.Class.cls class gets created #4

eduard93 opened this issue Nov 27, 2017 · 14 comments

Comments

@eduard93
Copy link

eduard93 commented Nov 27, 2017

Let's say I have: Package.Class class.

Sometimes additional class: Package.Class.CLS gets created.

@eduard93
Copy link
Author

I have a suspicion that it affects classes with lots of packages, eg.: p1.p2.p3.class

@drakut
Copy link

drakut commented Oct 30, 2019

I have the same problem. And I have some doubt that the only module to sync code with studio and git is not supported already )

@eduard93
Copy link
Author

This is this particular fork issue. Main doesn't have the problem (however it is XML only).
I've been chasing this bug on and off for years now.

@eduard93
Copy link
Author

eduard93 commented Sep 9, 2021

Example:
image

It often happens when I import an XML file, especially if compilation has errors.

@rcemper
Copy link

rcemper commented Sep 9, 2021

Just to understand the problem: are those CLS additional or is some class missing ? eg. 1 for each CLS

@eduard93
Copy link
Author

@rcemper CLS are always additional, they appear in both:

  • IRIS class list
  • On a disk

@rcemper
Copy link

rcemper commented Sep 10, 2021

I tried with intentionally broken XML from Studio, Got my error msg. but no CLS.
I'll try other imports variants.

@rcemper
Copy link

rcemper commented Sep 10, 2021

I just detected the pattern:
with a class package.classname you get this a nomal class >> package.classname.cls
and on top also a package.classname.CLS.cls (which might be empty ? I just guess)

@eduard93
Copy link
Author

Yes, but not always.

@rcemper
Copy link

rcemper commented Sep 10, 2021

Hi Eduard!
I'm able to reproduce the error at will.
Studio Alerts that the class doesn't exist and offers to remove it.
But when I run (bolded important lines)

DEMO>set tSC=$system.OBJ.Load(file,"ck",.er,.load)
Laden gestartet am 09/10/2021 20:18:37
Lade Datei C:\ZZ\oj.XML als xml
Importierte Klasse: DC.MyCompany.EmployeRegister1
Importierte Klasse: DC.MyCompany.EmployeeRegister
Importierte Klasse: oeje.Dir
Importierte Klasse: broken.CLS
Importiertes Projekt: oj.prj
Kompilieren von 4 Klassen
Kompilieren der Klasse DC.MyCompany.EmployeRegister1
Kompilieren der Klasse broken.CLS
Kompilieren der Klasse DC.MyCompany.EmployeeRegister
Kompilieren der Klasse oeje.Dir
Kompilieren der Tabelle DC_MyCompany.EmployeRegister1
Kompilieren der Tabelle DC_MyCompany.EmployeeRegister
Kompilieren der Tabelle oeje.Dir
Kompilieren der Routine DC.MyCompany.EmployeeRegister.1
Kompilieren der Routine DC.MyCompany.EmployeRegister1.1
Kompilieren der Routine oeje.Dir.1
Laden erfolgreich abgeschlossen.

!!!! SUCCESS !!!!! I can't believe it !

DEMO>ZW
%SAX=1
er=0
file="C:\ZZ\oj.XML"
load="DC.MyCompany.EmployeRegister1.cls,DC.MyCompany.EmployeeRegister.cls,broken.CLS.cls,oeje.Dir.cls,oj.prj"
load("DC.MyCompany.EmployeRegister1.cls")=""
load("DC.MyCompany.EmployeeRegister.cls")=""
load("broken.CLS.cls")=""
load("oeje.Dir.cls")=""
load("oj.prj")=""
tSC=1
DEMO>

this is >> NO error >>> class loaded >> success status

and the bolded line is what I inserted at the end of my XML export file

</Class>
<Class name="broken.CLS"></Class>
</Export>

It shows up as in your case:
image

this is 1 possible reason.
Suggested steps:

  • Check the XML input files
    if confirmed
  • check how they were generated.

It looks to me like a bug of the export code, eventually some source control ?

@isc-tleavitt
Copy link

isc-tleavitt commented Sep 10, 2021

More pointers for someone who wants 5000 DC points more than I do:
Try exporting a class from the right click context menu in the Workspace view in Studio. This wrongly has slashes instead of dots (as stated in https://github.com/MakarovS96/cache-tort-git/blob/master/%25SourceControl/Git/Utils.cls.xml#L776).
https://github.com/MakarovS96/cache-tort-git/blob/master/%25SourceControl/Git/Utils.cls.xml#L787 doesn't apply to .cls

@rcemper
Copy link

rcemper commented Sep 10, 2021

I placed a prodlog on the strange behavior of $system.OBJ.Load()
PRODLOG 951065

@drakut
Copy link

drakut commented Dec 7, 2021

Awesome! @rcemper thanks a lot for fix this bug ) @MakarovS96 I think this issue can be closed already.

@rcemper
Copy link

rcemper commented Dec 7, 2021

yes, OK:
this was a real challenge!

@eduard93 eduard93 closed this as completed Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants