Skip to content
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

Complete rebuild of Wokwi-Intellij with the goal of version 1.0 #14

Merged
merged 73 commits into from
Feb 23, 2024

Conversation

Jozott00
Copy link
Owner

@Jozott00 Jozott00 commented Feb 3, 2024

This pull request tracks the progress of the effort to rebuild the Wokwi-Intellij in a stable way using the official wcode simulator by Wokwi.

  • Integrate wcode simulator
  • Add read-only console
  • Add wokwi.toml semantics
  • Add wokwi licensing
  • Add debugging functionality

Project support:

  • Support esp-rs projects
  • Support esp-idf projects
  • Support arduino family
  • Support raspberry pi pico
  • Support stm32 family
  • Support microPython

dependabot bot and others added 28 commits January 4, 2024 22:03
Bumps [org.jetbrains.kotlinx:kotlinx-serialization-json](https://github.com/Kotlin/kotlinx.serialization) from 1.6.0 to 1.6.2.
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](Kotlin/kotlinx.serialization@v1.6.0...v1.6.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.java-websocket:Java-WebSocket](https://github.com/TooTallNate/Java-WebSocket) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/TooTallNate/Java-WebSocket/releases)
- [Changelog](https://github.com/TooTallNate/Java-WebSocket/blob/master/CHANGELOG.md)
- [Commits](TooTallNate/Java-WebSocket@v1.5.4...v1.5.5)

---
updated-dependencies:
- dependency-name: org.java-websocket:Java-WebSocket
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps org.gradle.toolchains.foojay-resolver-convention from 0.7.0 to 0.8.0.

---
updated-dependencies:
- dependency-name: org.gradle.toolchains.foojay-resolver-convention
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps org.jetbrains.intellij from 1.16.1 to 1.17.0.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
This commit introduces developer notes for the Wokwi project. It includes documentation on Communication Architecture, Debugger, Intellij Debugger, and Wokwi Code notes. Accompanied by related XML files, these documents are meant to archive Wokwi infrastructure, code examples, and other relevant documentation.
The code has been refactored to remove redundant files and tighten up the simulation functionality. Unnecessary components and services related to simulator behavior have been removed, including 'JCEFContent' and 'WokwiRootService'. The 'WokwiProjectService' was heavily simplified with several functions simplified or removed. Logging was also improved for easier debugging.
Bumps [JetBrains/qodana-action](https://github.com/jetbrains/qodana-action) from 2023.3.0 to 2023.3.1.
- [Release notes](https://github.com/jetbrains/qodana-action/releases)
- [Commits](JetBrains/qodana-action@v2023.3.0...v2023.3.1)

---
updated-dependencies:
- dependency-name: JetBrains/qodana-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
This commit introduces new SVG icons for two features: logging and plugin. The icons, "[email protected]" and "[email protected]", will be useful for differentiating between these two functionalities in the UI. A darker version of the log icon has also been added for use in dark-mode settings.
This commit includes multiple improvements for Wokwi's simulation configuration and tool window panels. Changes include adding dependencies and notifications for TOML files, updating resources for improved user experience, adding inspections for configuration validity, and incorporating actions for simulation control in the console tool window.
Bumps [jtalk/url-health-check-action](https://github.com/jtalk/url-health-check-action) from 3 to 4.
- [Release notes](https://github.com/jtalk/url-health-check-action/releases)
- [Commits](Jtalk/url-health-check-action@v3...v4)

---
updated-dependencies:
- dependency-name: jtalk/url-health-check-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action) from 2 to 3.
- [Release notes](https://github.com/gradle/gradle-build-action/releases)
- [Commits](gradle/gradle-build-action@v2...v3)

---
updated-dependencies:
- dependency-name: gradle/gradle-build-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
This overhaul introduces a modified system for handling Wokwi configuration, replacing the outdated 'WokwiConfigFileProcessor' class with a more robust and efficient 'WokwiConfigProcessor'. Additionally, the configuration data structures were revised to better suit the new processing method. The notification system was also enhanced to include user-driven actions.
…v/codecov-action-4

Bump codecov/codecov-action from 3 to 4
…/gradle-build-action-3

Bump gradle/gradle-build-action from 2 to 3
…url-health-check-action-4

Bump jtalk/url-health-check-action from 3 to 4
…ins/qodana-action-2023.3.1

Bump JetBrains/qodana-action from 2023.3.0 to 2023.3.1
…ntellij-1.17.0

Bump org.jetbrains.intellij from 1.16.1 to 1.17.0
…chains.foojay-resolver-convention-0.8.0

Bump org.gradle.toolchains.foojay-resolver-convention from 0.7.0 to 0.8.0
…ket-Java-WebSocket-1.5.5

Bump org.java-websocket:Java-WebSocket from 1.5.4 to 1.5.5
…otlinx-kotlinx-serialization-json-1.6.2

Bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.6.0 to 1.6.2
Copy link

github-actions bot commented Feb 3, 2024

Qodana Community for JVM

3 new problems were found

Inspection name Severity Problems
Const property naming convention ◽️ Notice 3

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/[email protected]
        with:
          upload-result: true
Contact Qodana team

Contact us at [email protected]

Jozott00 and others added 28 commits February 20, 2024 20:31
The build-docs.yml workflow has been simplified to streamline the process. It no longer includes explicit permissions and conducts fewer steps: checking out the repository, building the documentation, and uploading the artifact. Testing and deployment phases have been removed, reducing some unnecessary complexity.
This update refactors the Wokwi configuration path and diagram path loading, improving its error handling and ensuring it can deal with multiple configuration or diagram files. It also modifies the gdbServer setup, adding a check to see if it is running before attempting to reset it. Additionally, there are modifications to ensure compatibility with a recent update in IntelliJ platform.
Introduced three new scalable vector graphic (SVG) icons for use in the application. These icons depict logs and plugins and will enhance visual identification within the software. These icons will replace the old ones, providing a cleaner, more modern aesthetic.
The changes involved refactoring the import statements by explicitly importing required classes instead of using wildcard characters. Also, some unnecessary import statements that are no longer used in code have been removed. This makes the code cleaner, easier to read, and maintain. Updating these import statements will not affect the functionality of the application.
Refactored various parts of the code to improve license verification in the Wokwi plugin. The upgrade introduces a status card to display the license status, includes functions to update or remove license, and presents a more user-friendly configuration panel. The CoroutineScope were also revised to use Dispatchers.IO, redundant imports were cleaned up and log warnings were removed for better code efficiency.
The commit improves the license verification process for the Wokwi plugin and brings a substantial User Interface upgrade. The changes include new functions for license status update or removal, and enhancements to the configuration panel for better user interaction. Efficiency of CoroutineScope has been improved with the use of Dispatchers.IO, unnecessary code has been removed for cleaner and more efficient operation.
…nfig files

This commit updates the Wokwi debug configuration and adds inspections for Wokwi configuration files. Class WokwiStartDebugConfigType has been renamed to 'Wokwi Start Debug'. Two new classes, WokwiConfigInspectionBase and WokwiFileType, have been added to manage and inspect Wokwi configuration files. Moreover, inspections on ConfigVersionInspection and ElfFirmwareInspection have been improved for efficiency.
The changes primarily involve moving several inspections from the 'toml' package to the 'ide' package. Changes were made in the 'WokwiConfigInspectionBase' class to check the file type using 'isWokwiToml' instead of comparing the filename. The 'toml-only.xml' file was updated accordingly to reflect these changes.
This commit introduces the WokwiResult class for improved error handling and adds more support for different firmware formats in the WokwiArgsLoader. It includes exhaustive checks for firmware format extension and refactors license loading logic under the WokwiLicensingService. Functionality for packing ESP-IDF firmware is also implemented under new FirmwareUtils. Arrow Core library is added for functional programming benefits.
The implementation of determining the firmware format has been moved to a new utility method in FirmwareUtils. This refactor simplifies the code in WokwiArgsLoader. Also, an adjustment has been made to the start command in WokwiSimulator, appropriating the firmware format. A new string extension function hexStringToByteArray() for hexadecimal string conversion is also added.
Added SVG icons for the dark and light theme mode. Revised README to include a project logo, shields for contributors, license, issues etc. and documentation link. Included installation instructions, the roadmap for the plugin, instructions for contributing, and the license used for the project.
Added a new SVG logo to the project. This modification also includes various colors providing flexibility to use the logo in various contexts and themes. Logo is added keeping the existing styles and themes consistent.
Deleted the WokwiConfigTest as it's no longer required. Also, a colourful SVG logo has been added to the project resources. This new logo provides greater flexibility for branding in various contexts and themes, while maintaining consistency with existing styles.
This commit updates various parts of the codebase for performance and clarity. Several unused imports and classes have been removed. The code has been reviewed for correct and concise syntax, leading to changes like replacing verbose condition statements with direct return statements. Furthermore, suppress annotations have been added to ignore warnings where necessary. Some HTML alignment attributes have been replaced with CSS styles. Finally, all the markdown files include in the repository's documentation have been removed.
This commit includes a broad overhaul of the codebase, focusing on simplification and efficiency. Unnecessary imports and classes are removed, and cleaner code structures are used to replace convoluted ones. Certain warning suppressions have been added where needed. Specific corrections include a method call simplification in FirmwareUtils and unnecessary method removal from the ResourceLoader and WokwiConsoleToolWindow classes. The update thread is set to EDT for ActionUpdateThread in Action classes, and toml syntax handling is optimized in MissingConfigurationInspection.Improve code quality and add new inspection descriptions

This commit includes both changes aimed at improving code leg
Unnecessary suppress annotations and an unused file were removed to clean up the codebase. Additionally, HTML files were updated to include the language attribute for better accessibility.
Method parameters have been renamed for clarity in the WokwiConfigInspectionBase.kt and WokwiConfigVisitor.kt files. Additionally, the suppress annotation application has been optimized in the WokwiConfigProcessor.kt. Var keyword introduced for better JSON conversion in the simulator/index.html.
The `checkFileInternal` and `buildVisitorInternal` methods have been updated in WokwiConfigInspectionBase for clearer processing, removing unnecessary null returns. Updated IntelliJ platform version and plugin build number in gradle.properties. Removed applicability check in ConsoleWindowFactory and added tool window checking in WokwiProjectService to prevent doubling of console windows.
…onsoleWindowFactory

The platformVersion in gradle.properties file was upgraded from 2023.2 to 2023.3 to support the updated IntelliJ platform. Also marked the isApplicable method in ConsoleWindowFactory as deprecated and replaced it with isApplicableAsync method for clearer and efficient processing.
@Jozott00 Jozott00 merged commit 943c4d4 into main Feb 23, 2024
6 checks passed
@Jozott00 Jozott00 deleted the rebuild branch March 4, 2024 11:13
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.

1 participant