Skip to content

import a library from another vscode extension #21372

Open

Description

(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"]

Activity

  1. added
    needs proposalNeed to make some design decisions
    area-environmentsFeatures relating to handling interpreter environments
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Jun 7, 2023
  2. brettcannon commented on Jun 7, 2023

    @brettcannon
    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.

  3. BlackRam-oss commented on Jun 7, 2023

    @BlackRam-oss
    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.

  4. brettcannon commented on Jun 8, 2023

    @brettcannon
    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.

  5. BlackRam-oss commented on Sep 7, 2023

    @BlackRam-oss
    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

  6. brettcannon commented on Sep 7, 2023

    @brettcannon
    Member

    Black Ram (@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?

  7. BlackRam-oss commented on Sep 8, 2023

    @BlackRam-oss
    Author

    Black Ram (@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

  8. BlackRam-oss commented on Oct 16, 2023

    @BlackRam-oss
    Author

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

    Would the solution I gave work?

  9. brettcannon commented on Oct 17, 2023

    @brettcannon
    Member

    Black Ram (@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

Metadata

Metadata

Labels

area-apiAPI related issuesarea-environmentsFeatures relating to handling interpreter environmentsfeature-requestRequest for new features or functionalityneeds proposalNeed to make some design decisions

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions