Skip to content

Remove the struct Manifest in ten_rust and the all_fields field in struct Property #1205

@halajohn

Description

@halajohn

The sole purpose of this field is to preserve the original order of manifest.json and property.json when writing in-memory data back to these files. However, this implementation has poor maintainability. A better approach would be to remove this field—i.e., remove this mechanism—and replace it with the following mechanism:

  1. When tman reads in manifest.json and property.json, sort the contents of the JSON files. The sorting rules are as follows:

manifest.json

property.json

  1. After sorting in memory in Step 1, if the file content has changed, write it back to the JSON file. If there is no change, do not write back (to avoid changes to file modification time, etc.).

Metadata

Metadata

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions