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

@inject(FileSystem) will inject the type instead of the actual object #8497

Closed
slhultgren opened this issue Sep 11, 2020 · 2 comments · Fixed by #8507
Closed

@inject(FileSystem) will inject the type instead of the actual object #8497

slhultgren opened this issue Sep 11, 2020 · 2 comments · Fixed by #8507
Labels
bug bugs found in the application filesystem issues related to the filesystem

Comments

@slhultgren
Copy link
Contributor

I know that the FileSystem is deprecated, however it is currently broken since the bad thing is injected.

https://github.com/eclipse-theia/theia/blob/master/packages/filesystem/src/browser/filesystem-frontend-module.ts#L85

Shouldn't this return a new instance instead of just a class?

When running this code:
@Inject(FileSystem) private fileSystem: FileSystem;
...
console.log("fs.exists: " + this.fileSystem.exists);

You will get "fs.exists: undefined"

However, (this.fileSystem as any).prototype.exists does exist.

@vince-fugnitto
Copy link
Member

cc @akosyakov

@vince-fugnitto vince-fugnitto added filesystem issues related to the filesystem question user / developer questions labels Sep 11, 2020
@akosyakov akosyakov added bug bugs found in the application and removed question user / developer questions labels Sep 13, 2020
@akosyakov
Copy link
Member

Good catch! Please send a PR.

slhultgren added a commit to slhultgren/theia that referenced this issue Sep 15, 2020
Fixes issue eclipse-theia#8497

Signed-off-by: Samuel HULTGREN <samuel.hultgren@st.com>
slhultgren added a commit to slhultgren/theia that referenced this issue Sep 18, 2020
Fixes issue eclipse-theia#8497

Signed-off-by: Samuel HULTGREN <samuel.hultgren@st.com>
vince-fugnitto pushed a commit that referenced this issue Sep 24, 2020
Fixes issue #8497

Signed-off-by: Samuel HULTGREN <samuel.hultgren@st.com>
EstherPerelman pushed a commit to EstherPerelman/theia that referenced this issue Oct 29, 2020
Fixes issue eclipse-theia#8497

Signed-off-by: Samuel HULTGREN <samuel.hultgren@st.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application filesystem issues related to the filesystem
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants