Skip to content

Replace modelica:// by modelica:/#3254

Merged
HansOlsson merged 6 commits into
modelica:masterfrom
HansOlsson:NoAuthority
Jun 7, 2023
Merged

Replace modelica:// by modelica:/#3254
HansOlsson merged 6 commits into
modelica:masterfrom
HansOlsson:NoAuthority

Conversation

@HansOlsson
Copy link
Copy Markdown
Collaborator

Fix the major problem that using authority as a path is problematic, since they are normally case-insensitive.
(And keep the old variant as a deprecated feature to not break compatibility.)

This should be straightforward to adapt in tools, and then in libraries - in a safe way without breaking compatibility.

@HansOlsson HansOlsson added the enhancement New feature or request label Sep 29, 2022
Copy link
Copy Markdown
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

We shouldn't miss the opportunity to make the new Modelica URIs more useful than the ones we have today. That's the purpose of MCP #2663.

@HansOlsson HansOlsson added this to the Phone 2022-5 milestone Oct 6, 2022
@HansOlsson
Copy link
Copy Markdown
Collaborator Author

We shouldn't miss the opportunity to make the new Modelica URIs more useful than the ones we have today. That's the purpose of MCP #2663.

We should correct Modelica URIs so that they work right now; and can be updated with minimal changes in models.
Restructuring all resources as proposed in #2663 would break compatibility in various ways and is thus problematic and shouldn't block this good change.

@henrikt-ma
Copy link
Copy Markdown
Collaborator

We should correct Modelica URIs so that they work right now; and can be updated with minimal changes in models.
Restructuring all resources as proposed in #2663 would break compatibility in various ways and is thus problematic and shouldn't block this good change.

No, #2663 isn't breaking backwards compatibility thanks to the use of a new form of Modelica URIs that can't be mistaken for the old form. Hence, the problem is that if we do what is suggested here, we will miss the opportunity to introduce a better mechanism in a backwards compatible way.

@HansOlsson
Copy link
Copy Markdown
Collaborator Author

HansOlsson commented Oct 13, 2022

I have now found the specific part that requires the authority to be case-insensitive, which allows things like modelica://modelica.mechanics/ with current syntax.

It's found in RFC3986 (but likely not in the original RFC1738) https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2 so technically it's not the authority that is case-insensitive, but its host-part (which amounts to the same). (Which means that modelica URIs were broken when it was added in 2009, since the rfc is from 2005.)

@HansOlsson HansOlsson modified the milestones: Phone 2022-5, Phone 2022-6 Nov 20, 2022
@HansOlsson HansOlsson requested a review from henrikt-ma January 8, 2023 20:47
@HansOlsson HansOlsson added bug Something isn't working and removed enhancement New feature or request labels Jan 8, 2023
Copy link
Copy Markdown
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

Nothing has changes since my last review, but it would be nice to try to find a solution after we're done releasing 3.6.

@HansOlsson HansOlsson requested a review from henrikt-ma April 18, 2023 14:48
@HansOlsson
Copy link
Copy Markdown
Collaborator Author

Based on the meeting discussion for #2663 I understand this should be re-activated.

@henrikt-ma
Copy link
Copy Markdown
Collaborator

Considering that we use the period for separating identifiers of the class, the leading path separator in modelica:/Modelica.Mechanics/Resources/foo.txt doesn't really make sense to me. Since it doesn't really make sense, we should also consider omitting it, like this:

modelica:Modelica.Mechanics/Resources/foo.txt

@HansOlsson
Copy link
Copy Markdown
Collaborator Author

Considering that we use the period for separating identifiers of the class, the leading path separator in modelica:/Modelica.Mechanics/Resources/foo.txt doesn't really make sense to me. Since it doesn't really make sense, we should also consider omitting it, like this:

modelica:Modelica.Mechanics/Resources/foo.txt

The leading path separator has semantic meaning in URIs, and the leading path separator makes sense currently - and allow us to later introduce a variant without - with different semantics.

@HansOlsson
Copy link
Copy Markdown
Collaborator Author

The leading path separator has semantic meaning in URIs, and the leading path separator makes sense currently - and allow us to later introduce a variant without - with different semantics.

Thus I think we should move forward with this one as is.

Copy link
Copy Markdown
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

I'm missing a description of the deprecated use of the host part to give the class name.

@HansOlsson
Copy link
Copy Markdown
Collaborator Author

I'm missing a description of the deprecated use of the host part to give the class name.

It was sort of there, but I cleaned it up, made it into a separate paragraph, and added two examples.

Comment thread chapters/packages.tex
Copy link
Copy Markdown
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

Looks OK with the exception of removing the constraint on the "first part of the path".

@henrikt-ma
Copy link
Copy Markdown
Collaborator

It would also be good to see the conflicts resolved before giving a final approval.

@HansOlsson
Copy link
Copy Markdown
Collaborator Author

It would also be good to see the conflicts resolved before giving a final approval.

Now done. It was the comma-change that caused the conflict.

@HansOlsson HansOlsson modified the milestones: Phone 2022-6, Phone 2023-3 Jun 5, 2023
Copy link
Copy Markdown
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

Looks good now.

@HansOlsson HansOlsson merged commit fddd17e into modelica:master Jun 7, 2023
@HansOlsson HansOlsson deleted the NoAuthority branch June 7, 2023 13:30
@HansOlsson HansOlsson added the M37 For pull requests merged into Modelica 3.7 label Dec 14, 2023
@HansOlsson HansOlsson added the semanticChanges For pull request that changes the semantics (neither used for fixes nor enhancements). label Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working M37 For pull requests merged into Modelica 3.7 semanticChanges For pull request that changes the semantics (neither used for fixes nor enhancements).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants