Skip to content

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

Merged
merged 10 commits into from
Apr 7, 2025
Merged

Fix 2024 hard crash, introduce config #18

merged 10 commits into from
Apr 7, 2025

Conversation

pepperoni505
Copy link
Contributor

@pepperoni505 pepperoni505 commented Apr 3, 2025

This makes the interface work again in 2024, as layout.json and manifest.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

@pepperoni505 pepperoni505 requested a review from a team as a code owner April 3, 2025 15:03
@SkySails SkySails requested a review from Copilot April 3, 2025 15:26
Copy link

@Copilot Copilot AI left a 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";

@pepperoni505 pepperoni505 changed the title fix: remove dependency on manifest.json and layout.json Fix 2024 hard crash, introduce config Apr 3, 2025
@pepperoni505 pepperoni505 requested a review from Copilot April 3, 2025 19:40
Copy link

@Copilot Copilot AI left a 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`.

@pepperoni505 pepperoni505 merged commit 8322cbe into main Apr 7, 2025
4 checks passed
@pepperoni505 pepperoni505 deleted the 2024-fixes branch April 7, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants