-
Notifications
You must be signed in to change notification settings - Fork 1
Fix 2024 hard crash, introduce config #18
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
Conversation
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.
Pull Request Overview
This PR removes the dependency on the manifest.json and layout.json files to restore the interface functionality in 2024. Key changes include:
- Removal of the manifest.json reading logic and associated Sentry plugin tagging.
- Removal of layout.json parsing and replacing it with directory enumeration to locate the bundled navigation files.
- Modification of the bundled folder constant to include a relative path prefix.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/wasm/src/sentry_gauge.rs | Eliminated manifest.json dependency and removed plugin tag configuration. |
src/wasm/src/database/mod.rs | Removed layout.json usage; replaced it with direct directory scanning for files and updated bundled folder definition. |
Comments suppressed due to low confidence (1)
src/wasm/src/database/mod.rs:49
- The constant now includes a relative path prefix which may lead to duplicate prefixes when constructing paths (e.g. '.{BUNDLED_FOLDER_NAME}{cycle_file_name}' may result in '..\NavigationData\cycle.json'). Consider renaming the constant to just the folder name or update the formatting logic to avoid redundant path prefixes.
pub const BUNDLED_FOLDER_NAME: &str = ".\NavigationData";
manifest.json
and layout.json
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.
Copilot reviewed 8 out of 10 changed files in this pull request and generated no comments.
Files not reviewed (2)
- examples/aircraft/PackageDefinitions/navigraph-aircraft-navigation-data-interface-sample.xml: Language not supported
- examples/aircraft/PackageSources/Navigraph/config.json: Language not supported
Comments suppressed due to low confidence (2)
src/wasm/src/database/mod.rs:50
- The BUNDLED_FOLDER_NAME constant now includes a '.' prefix. Ensure this format is consistent with all file system interactions and matches documentation expectations.
pub const BUNDLED_FOLDER_NAME: &str = ".\Navigraph/BundledData";
README.md:57
- [nitpick] Ensure that the bundled data directory path in the documentation matches the format used in code ('.\Navigraph/BundledData') to avoid potential confusion.
place the navigation data into the `Navigraph/BundledData` directory in `PackageSources`.
This makes the interface work again in 2024, as
layout.json
andmanifest.json
are not exposed to the WASM file system. Also introduced an optional config.json for developers to provide which aides with Sentry logging.Breaking change: Bundled navigation data must now live in
Navigraph/BundledData