Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

SVT: Eclipse plugin: Appsody Python language not selected by default on import #398

Closed
mmulholl opened this issue Sep 9, 2019 · 7 comments

Comments

@mmulholl
Copy link

mmulholl commented Sep 9, 2019

Codewind version: 0.3.1
OS: Mac

Che version:
IDE extension version:
IDE version: Eclispe committers Version: 2019-06 (4.12.0)
Kubernetes cluster:

Description:
When I import an appsody python flask project the language of "Python" is not selected by default as part of the import wizard.

Steps to reproduce:

  1. Create an appsody python flask project.
  2. Remove the project from Codewind.
  3. Import the project. Wizard does not select an language by default.

Note: Project still works.

Workaround:

@tetchel
Copy link

tetchel commented Sep 9, 2019

The detection logic only checks for Java, Node, or Swift.

https://github.com/eclipse/codewind/blob/master/src/initialize/src/controllers/typeDetectionController.ts

If we want to detect more languages, that's an enhancement for the portal team.

@tobespc
Copy link
Contributor

tobespc commented Sep 10, 2019

yes, so right now Appsody is detected as a type only, not with the additional language. One of the main reasons for this is that due to the way Appsody stacks are put together, we may not be able to get at that info. What we could do is enhance the data that we get from the appsody to include that which should then be a no-op for portal (yep, I'm passing the work to @makandre !)

@tobespc tobespc self-assigned this Sep 10, 2019
@makandre
Copy link
Contributor

Appsody doesn't really have a language per se, what they have is stack (tho from the stack you could arguably infer from it what the underlying language is)

So when we implemented the appsody extension we relied on portal to detect the language that Codewind recognizes. If we want to language detection to be done by the appsody extension, we would need a new plug-point for extensions during that language detection stage.

@mmulholl
Copy link
Author

It sets the correct language for other appsody types.

@makandre
Copy link
Contributor

Other appsody language detection works because portal can detect those languages as @tetchel pointed out #398 (comment)

I noticed (in vscode at least) if I import a Codewind python project, there's a prompt for me to select the language (which makes sense since portal does not detect python). But there's no such prompt for Appsody python project.

@makandre
Copy link
Contributor

I guess the new language detection code is here in the installer now: https://github.com/eclipse/codewind-installer/blob/master/utils/project.go#L37

Perhaps a quick fix would be to make it able to detect python language (maybe by presence of files ending with .py?)

@tetchel
Copy link

tetchel commented Sep 19, 2019

installer can correctly detect python now if the project contains a Pipfile, which does work for the appsody flask template

@tetchel tetchel closed this as completed Sep 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants