Fix 2024 hard crash, introduce config - #18
Merged
Merged
Conversation
There was a problem hiding this comment.
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.jsonThere was a problem hiding this comment.
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`.
SkySails
approved these changes
Apr 7, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This makes the interface work again in 2024, as
layout.jsonandmanifest.jsonare 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