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

import a library from another vscode extension #21372

Open
Tracked by #1
BlackRam-oss opened this issue Jun 6, 2023 · 8 comments
Open
Tracked by #1

import a library from another vscode extension #21372

BlackRam-oss opened this issue Jun 6, 2023 · 8 comments
Assignees
Labels
area-api API related issues area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality needs proposal Need to make some design decisions

Comments

@BlackRam-oss
Copy link

BlackRam-oss commented Jun 6, 2023

(I created this issue during linked to the following discussion #21284 (reply in thread))

My request is to add the functionality of adding a library through the API.

During the discussion I was told that there is currently a setting very similar to my request, viz: "python.autoComplete.extraPaths": ["/home/user/renpy"]

@BlackRam-oss BlackRam-oss added the feature-request Request for new features or functionality label Jun 6, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 6, 2023
@karthiknadig karthiknadig added needs proposal Need to make some design decisions area-environments Features relating to handling interpreter environments and removed triage-needed Needs assignment to the proper sub-team labels Jun 7, 2023
@karthiknadig karthiknadig self-assigned this Jun 7, 2023
@brettcannon
Copy link
Member

Another data point is https://marketplace.visualstudio.com/items?itemName=designtoproduction.rhinopython is instructing people how to set extraPaths by copying and pasting from their README which include hard-coded paths to where their extension would be which isn't consistent across all machines.

@BlackRam-oss
Copy link
Author

Another data point is https://marketplace.visualstudio.com/items?itemName=designtoproduction.rhinopython is instructing people how to set extraPaths by copying and pasting from their README which include hard-coded paths to where their extension would be which isn't consistent across all machines.

Okay, I know there is this possibility.

But it has some disadvantages:
The library I need to add is inside subfolders of renpy SDK. I honestly think that asking the user to manually enter the path to the SDK is doable (I would add the rest of the path), while asking for the path to a subfolder of the SDK creates misunderstandings.

Also, it would be helpful for me to have the path to the SDK. And asking for both the path to the SDK and the path to the library in a sub folder of the SDK, seems foolish to me.

@brettcannon
Copy link
Member

Okay, I know there is this possibility.

I'm not specifically suggesting this to you, @donrp . I'm just making sure we record the fact that other extensions could benefit from a solution so this isn't viewed as exclusively a problem on you are having.

@BlackRam-oss
Copy link
Author

if this implementation is not too difficult I could implement it myself? I ask because I would need it and I noticed that there are many issues

I am familiar with typescript, but I have not long started vscode development.
if you can tell me in broad strokes what I should modify, I can do it

@brettcannon brettcannon added the area-api API related issues label Sep 7, 2023
@brettcannon
Copy link
Member

@BlackRam-oss we first need a proposal of exactly what a solution would look like before we could talk about a PR to implement something. Do you have such a proposal?

@BlackRam-oss
Copy link
Author

BlackRam-oss commented Sep 8, 2023

@BlackRam-oss we first need a proposal of exactly what a solution would look like before we could talk about a PR to implement something. Do you have such a proposal?

mmm, I think I understand

( I don't really remember what the python.autoComplete.extraPaths, Add folders as libraries? )

I think the best solution is to add a function for example:

function add addExtraPaths (libPath) {
   // for exemple libPath = "/home/user/renpy"

   // if libPath is valid then I continue
   let internalLibPaths: string[] = // get array from settings python.autoComplete.extraPaths
   internalLibPaths.append(libPath)
   // after set python.autoComplete.extraPaths with internalLibPaths
}

this could work

@BlackRam-oss
Copy link
Author

@brettcannon Sorry if I insist, but it's a change that would help me.

Would the solution I gave work?

@brettcannon
Copy link
Member

@BlackRam-oss we haven't had the time to think it through as we're all a bit swamped with pre-existing work. We can try to provide feedback in the next few weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-api API related issues area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality needs proposal Need to make some design decisions
Projects
None yet
Development

No branches or pull requests

3 participants