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

git widget init fail after packaged #13479

Open
fanyipin opened this issue Mar 12, 2024 · 8 comments
Open

git widget init fail after packaged #13479

fanyipin opened this issue Mar 12, 2024 · 8 comments

Comments

@fanyipin
Copy link
Contributor

Bug Description:

when application require @theia/git, the webpack will handle git-locator-host as a entry; but the git-locator-host file don't require
the reflect-metadata module. when run,the Error 'Reflect.hasOwnMetadata is not a function' will throw. therefore the git child_process is cannot run.

Steps to Reproduce:

  1. add @theia/git in package.json
  2. start application

Additional Information

  • Operating System:
  • Theia Version: 1.46
@JonasHelming
Copy link
Contributor

We are about to deprecate the Theia/git extension, we recommen using the built-in VS Code extension instead. See #12745

@fanyipin
Copy link
Contributor Author

fanyipin commented Mar 13, 2024

Ok, I understand, but do you still need to fix the problem for historical projects? At present, the latest code makes a separate entrance for @theia/git when webpack is packaged。I think the problems I have encountered so far are mainly caused by the lack of modules。#13487

@JonasHelming
Copy link
Contributor

Is the link above correct? It does not show a PR for me.

@fanyipin
Copy link
Contributor Author

fanyipin commented Mar 13, 2024

Is the link above correct? It does not show a PR for me.

Sorry, it seems like there's still a problem with my PR submission. I noticed that there's a check failure in this PR, which indicates that the Author did not have a signed ECA on file.

@fanyipin
Copy link
Contributor Author

Is the link above correct? It does not show a PR for me.

it's ok; Please review these changes in this pull request when you have a moment; Thanks

1 similar comment
@fanyipin
Copy link
Contributor Author

Is the link above correct? It does not show a PR for me.

it's ok; Please review these changes in this pull request when you have a moment; Thanks

@jfaltermeier
Copy link
Contributor

Hi, I tried to reproduce the error, but I don't get the 'Reflect.hasOwnMetadata is not a function' error and git seems to be working fine.

For testing I used
https://github.com/eclipse-theia/generator-theia-extension
and generated an empty extension, then added @theia/git to the electron and browser application.

Do you get the error with these steps as well? Which node version are you using?

@fanyipin
Copy link
Contributor Author

fanyipin commented Mar 19, 2024

Sorry for just seeing this response. In such a scenario, when a project has not been initialized with git from the beginning and subsequently the git init command is run within the terminal, git components will not reflect the most recent file changes. This occurs because the mechanism for monitoring changes is facilitated by ipc-bootstrap file that launches a subordinate process, which in turn loads the git-locator-host module while operating in a multi-processing context. Therefore, pertinent error information is not displayed directly in the console output.

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

No branches or pull requests

3 participants