Skip to content

Can the list of used languages in a chunk always be derived from the content? #367

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

Open
ftomassetti opened this issue May 11, 2025 · 1 comment

Comments

@ftomassetti
Copy link
Contributor

In the serialization chunk we list the used languages. Now, I am wondering if the list can always be derived from the metapointers used in the chunk or there are case when this does not happen. And this leads me to a second question about its meaning.

For example:

  • In the chunk I serialize a node of Concept C, and Concept C implements an interface I from another language. Interface I does not define features, or it defines features for which the node has empty values, and so they are omitted. There will be no reference to I or its language in the chunk.
  • In the chunk I serialize a node of Concept C, which has containments or references that can hold values of type D. If they are empty type D is not mentioned and it could be coming from another language

So it seems to me that these unmentioned languages are necessary to properly work with these nodes.

So I wonder if we should interpret the list of used languages:

  • As a sort of cache that can be calculated by looking at the chunk
  • As a carefully calculated list of languages which specify which languages are necessary to work with the nodes in the chunk, even if it is not obvious at a first glance
@enikao
Copy link
Contributor

enikao commented May 12, 2025

At the moment we specified it as

elements MUST contain all language/version referred to by any Meta-pointer in the processed document.

So only what's inside the chunk.

Your proposed alternative would indeed be useful. I could construct edge cases where this leads to problems. For example if we added several new empty super-interfaces from not-yet-mentioned languages to instantiated concepts -- the content of the chunk would not change, but the list of used languages. However, we said in #213 that we consider a language (identified by [key, version]) fixed -- so if we changed the language without changing the version number, we're in unspecified territory.

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

No branches or pull requests

2 participants