Skip to content

Conversation

@adaussy
Copy link
Contributor

@adaussy adaussy commented Jan 23, 2026

PLEASE READ ALL ITEMS AND CHECK ONLY RELEVANT CHECKBOXES BELOW

Auto review

  • Have you reviewed this PR? Please do a first quick review, It is very useful to detect typos and missing copyrights, check comments, check your code... The reviewer will thank you for that :)

Project management

  • Has the pull request been added to the relevant milestone?
  • Have the priority: and pr: labels been added to the pull request? (In case of doubt, start with the labels priority: low and pr: to review later)
  • Have the relevant issues been added to the pull request?
  • Have the relevant labels been added to the issues? (area:, type:)
  • Have the relevant issues been added to the same project milestone as the pull request?

Changelog and release notes

  • Has the CHANGELOG.adoc + doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc been updated to reference the relevant issues?
  • Have the relevant API breaks been described in the CHANGELOG.adoc?
  • Are the new / upgraded dependencies mentioned in the relevant section of the CHANGELOG.adoc?
  • In case of a change with a visual impact, are there any screenshots in the doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?
  • In case of a key change, has the change been added to Key highlights section in doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?

Documentation

  • Have you included an update of the documentation in your pull request? Please ask yourself if an update (installation manual, user manual, developer manual...) is needed and add one accordingly.

Tests

  • Is the code properly tested? Any pull request (fix, enhancement or new feature) should come with a test (or several). It could be unit tests, integration tests or cypress tests depending on the context. Only doc and releng pull request do not need for tests.

AxelRICHARD and others added 3 commits January 14, 2026 16:47
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
Bug: eclipse-syson#1694
Signed-off-by: Gwendal Daniel <gwendal.daniel@obeosoft.com>
Bug: eclipse-syson#1847
Signed-off-by: Arthur Daussy <arthur.daussy@obeo.fr>
@adaussy adaussy changed the base branch from main to cooldown January 23, 2026 14:34
@adaussy adaussy changed the title Ada/fix/1887 [1887] Export fails to escape some names when using qualified name Jan 23, 2026
@AxelRICHARD AxelRICHARD added this to the 2026.3.0 milestone Jan 23, 2026
@AxelRICHARD AxelRICHARD linked an issue Jan 23, 2026 that may be closed by this pull request
@adaussy adaussy force-pushed the ada/fix/1887 branch 4 times, most recently from 19651c2 to f4a4835 Compare January 26, 2026 08:29
Signed-off-by: Arthur Daussy <arthur.daussy@obeo.fr>
Bug: eclipse-syson#1887
// Need relative qualified name
assertEquals("p3::Part1", this.getDeresolvedName(part1Def, part1Usage));
// Need qualified name cause name conflict
assertEquals("Root::p3::Part1", this.getDeresolvedName(part1Def, part1Usage));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems a strange modification, and does not correspond to the associated comment just above.

// located in p1_1 whereas we are targeting RootPackage::p1::x3
this.directEditInitialLabelTester.checkDirectEditInitialLabelOnNode(this.verifier, this.diagram, GeneralViewItemAndAttributeProjectData.GraphicalIds.P1_1_X1_ID,
"x1 = p1::x3 / p1::x3 * 10");
"x1 = RootPackage::p1::x3 / RootPackage::p1::x3 * 10");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems strange, why the fix of escaped qualified names would modified this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I totally prune the computation branch that tryied to compute a shorter qualified name.

This was this branch of code that caused the issue. As a first attempt I only fixed the "name" escape but short after a another issue was raised caused by the same branch. The problem appears with nested element with similiar name.

With the following model in memory:

package root {
    package p1 {
        part p1 {
            part p2 =p3; // Pointing to V2
        }
        part p3 {
            /* V1*/
        }
        part p3 {
            /* V2*/
        }
    }
}

The export would give:

package root {
	package p1 {
		part p1 {
			part p2 = p1::p3;
		}
		part p3 {
			/* V1 */
		}
		part p3 {
			/* V2 */
		}
	}
}

Wich is incorect because the "p1" in the qualified name is resolved against le "part p1" and not "package p1" following SysML resolving process.

This all branch was trying to improve the handling of name conflict but it causes more issues...

As it is a degraded model state (invalid name conflict) I finally implented a more simple (less error prone) approach. Use the full qualified name when there is name conflit.

This is the explaination for the different test result. In case of name conflict, use the full qualified name.

@AxelRICHARD
Copy link
Member

AxelRICHARD commented Jan 26, 2026

could you please auto-review your PR as asked by the PR template?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export fails to escape some names when using qualified name

3 participants