Repository navigation
feat(model): models and web tools can list what they require (#1405 item 2) #2124
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latent round-trip gap (confidence: medium, not reachable today).
check_fileaccepts a known capability inrequires, but nothing carries that list past import.model.importpasses onlynameandgraph/stepstomodel.new(cmd/sharing.rs:181-185),Modelhas no field for it, and the writer atmodel.rs:970emits only$schema,version,name,graph. So once a capability is added toCAPABILITIES, a file that requires it imports, and the next save or export silently drops the requirement. That is the losskept_as_writtenguards against for projects.It does nothing yet because
CAPABILITIESis empty, so any non-empty list is refused. Before the first capability is added, either keeprequireson the imported model, or refuse a known capability that the model can't keep. A test with a stub known capability would pin this down.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not changed. This matches projects since #1975: a format 2 project that requires only known capabilities opens and saves again as format 1 without
requires.CAPABILITIESis the list this RustGIS reads and saves again without loss. So when a capability is added, that same change makes the writer emit it whenever the saved model uses the feature, and a model that doesn't use it needs nothing listed. Keeping an imported list wouldn't help, since it would go stale as soon as the model is edited. The pairing is said whereCAPABILITIESis documented (docs/maintaining.md› Saved files and settings: "added toCAPABILITIESwhere it is read").