Skip to content

Conversation

@LoremIPsummer
Copy link
Collaborator

@LoremIPsummer LoremIPsummer commented Oct 27, 2023

Update Thrift to version 0.16.

Since version 0.14, Thrift does not generate certain files, causing an error in CMake. To solve this, I made a wrapper function around the generation logic, so if some of the specified files are not generated, we manually create them.

There was an undocumented breaking change involving the java transport protocol implementations. The indexer service didn't handle all the exceptions correctly, leading to an API mismatch.

Since version 0.15, the javascript library provided by the thrift npm package also ships with the nodejs bindings. For environment detection, it internally uses a package called browser-or-node. However, this plugin needs to be bundled with the generated javascript code, making it impossible to directly use it in the old webgui by simply referencing the thrift.js library downloaded from npm. Such change requires the introduction of a build system (like webpack or browserify), and the proper conversion of CommonJS modules to AMD, so it goes beyond the scope of this PR. However, a traditional browser version of the library can still be acquired by downloading it directly from the Thrift repository with the proper version. I've decided to simply grab it from here and put it into the appropriate scripts directory.

The new webgui doesn't produce this behavior, as expected.

fixes #630

@LoremIPsummer LoremIPsummer self-assigned this Oct 27, 2023
@LoremIPsummer LoremIPsummer marked this pull request as draft October 28, 2023 03:59
@LoremIPsummer LoremIPsummer marked this pull request as ready for review October 28, 2023 15:26
@mcserep mcserep self-requested a review October 31, 2023 11:53
@mcserep mcserep added Kind: Refactor 🔃 Target: Developer environment Developer environment issues consist of CodeCompass or 3rd-party build tooling, configuration or CI. Target: Service Issues related to the Thrift service. labels Oct 31, 2023
@LoremIPsummer LoremIPsummer requested a review from mcserep October 31, 2023 16:32
Copy link
Collaborator

@mcserep mcserep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub CI should also be updated to use Thrift 16.

@LoremIPsummer LoremIPsummer requested a review from mcserep November 8, 2023 05:08
 empty lines
@LoremIPsummer
Copy link
Collaborator Author

@mcserep
I also removed the not generated files from the new cppmetrics plugin from CMake.

Copy link
Collaborator

@mcserep mcserep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, nice work!

@mcserep mcserep merged commit 09958e1 into Ericsson:master Nov 12, 2023
barnabasdomozi pushed a commit to barnabasdomozi/CodeCompass that referenced this pull request Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Kind: Refactor 🔃 Target: Developer environment Developer environment issues consist of CodeCompass or 3rd-party build tooling, configuration or CI. Target: Service Issues related to the Thrift service.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Thrift to 0.16

2 participants