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

[bug] ide extension finds no messages – unify normalPath & normalizePath #2184

Open
samuelstroschein opened this issue Feb 6, 2024 · 11 comments
Assignees
Labels
scope: lix Related to source-code/git-sdk. type: bug Something isn't working

Comments

@samuelstroschein
Copy link
Member

Problem

CleanShot 2024-02-06 at 12 24 51@2x

Expected behavior

Displays messages

Reproduction

  1. Clone https://github.com/opral/example
  2. Open the project in the extension

Other information

Fink can open the repo and project just fine https://fink.inlang.com/github.com/opral/example

@samuelstroschein samuelstroschein added the type: bug Something isn't working label Feb 6, 2024
@maige-app maige-app bot added the scope: inlang/sherlock-vscode Related to source-code/ide-extension. label Feb 6, 2024
@felixhaeberle
Copy link
Contributor

@samuelstroschein There is no m or t syntax module defined.

@samuelstroschein
Copy link
Member Author

@felixhaeberle so? messages in the project exist and should be shown. the bug report is not about inline annotations

@felixhaeberle
Copy link
Contributor

Obviously the extension crashes somewhere because the customApi has to be set in the rendering of the messages view.

Of course we could make it more modular here but in general please just setup the project correctly and then it works. The extension requirement until this date wasn't to work without a matcher (at all).

For this bug, I will investigate why messages do not load and load them. It's probably nice to split the functionality here if people miss the matcher.

@samuelstroschein
Copy link
Member Author

Of course we could make it more modular here but in general please just setup the project correctly and then it works. The extension requirement until this date wasn't to work without a matcher (at all).

The project is setup correctly?

The custom API can be undefined ofc. Add an undefined check and you should be good to go.

@felixhaeberle
Copy link
Contributor

Again, the project is not set up to work with the ide extension (yet) because it was no requirement to have the ide extension working without the matcher, so the logic wasn't encapsulated there.

This will change with this issue so that the matcher can be undefined. The added features around the message tab allow this kind of loose matcher definition.

@felixhaeberle
Copy link
Contributor

felixhaeberle commented Feb 15, 2024

@jldec This is likely an SDK bug. I have successfully initialized the project but the query.messages.getAll query doesn't return messages.

Bildschirmfoto 2024-02-15 um 11 07 59
Bildschirmfoto 2024-02-15 um 11 07 43

cc @samuelstroschein I don't know why Fink is working here, but for me the SDK doesn't return messages.
https://fink.inlang.com/github.com/opral/example

Is the above usage of the API correct?

@felixhaeberle felixhaeberle added the scope: inlang/sdk Related to source-code/sdk. label Feb 15, 2024
@felixhaeberle
Copy link
Contributor

felixhaeberle commented Feb 15, 2024

Found the reason for this. The pathPattern has to be a relative path of course.

current, not working pathPattern: /resources/{languageTag}.json
correct pathPattern: ./resources/{languageTag}.json


Dug deeper: memoryFs makes use of the normalPath() function whereas the ide extension and a lot of other places make use of the normalizePath() function which diverges at this point.

cc @janfjohannes There is already a FIXME in the code.

* FIXME: unify with utilities/normalizePath!

I will assign Jan to take over the task of unify this API. I the meantime, I fixed the example.

@felixhaeberle felixhaeberle changed the title [bug] ide extension finds no messages [bug] ide extension finds no messages – unify normalPath & normalizePath Feb 15, 2024
@felixhaeberle felixhaeberle added scope: lix Related to source-code/git-sdk. and removed scope: inlang/sherlock-vscode Related to source-code/ide-extension. scope: inlang/sdk Related to source-code/sdk. labels Feb 15, 2024
@janfjohannes
Copy link
Contributor

will do

@felixhaeberle
Copy link
Contributor

@janfjohannes any update to this?:)

@janfjohannes
Copy link
Contributor

@felixhaeberle i keep tickets up to date usually, no need to ping for updates unless something changes on your end eg. new info or reason something gets much higher prio etc.

@janfjohannes
Copy link
Contributor

@felixhaeberle assigning you back as i dont know what the other parts of this ticket are about, feel free to reach out if i can help with something else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: lix Related to source-code/git-sdk. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants