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
How to tell the extension about dependencies that do not come from Maven or Gradle? #74
Comments
You need to add these to the gradle file. |
@robaho There is no gradle file |
The oracle plugin requires using gradle or maven. |
@robaho That's...thats what this issue is about... |
Then I would rephrase your question as a feature request to have the extension support non managed projects. |
This. I'd like to put a project-local
|
@bowbahdoe you can add "VM Options" in the "Run Configuration". For example: |
@Achal1607 Okay, I tried editing a settings.json and the run configurations options. No dice. |
FWIW, I would suggest to use absolute paths. |
@lahodaj That makes a run configuration pretty darn non-portable. I guess fine if its generated by a tool, but not if i'm doing it manually. It does work though with an absolute path. Go to definition doesn't and it doesn't work reading args from an argfile, but i guess its a start? so that works with a module path and a class path
|
Regarding "Go to definition doesn't" - could you please elaborate? I have some sample source using multi-source launcher. I can navigate (Ctrl-click or F12) across various source files that refer to each other. When I try to use GSon, I can navigate to the GSon class - if there are no sources, then it will "decompile". If there is a source bundle (I use |
I mean it does not do the first behavior. I haven't downloaded a sources jar to check the 2nd behavior but i can in a bit. If you want to work with the same clay I am, the tool I made to resolve dependencies is here https://github.com/bowbahdoe/jresolve-cli/releases/download/v2024.05.10/jresolve.jar You can run it with So example incantations:
(if package urls in a file)
You get the idea. My goal, which overlaps with the "I just downloaded a jar" folks, is to make that "work" here |
Hm, I've done something like this:
In the VS Code, I've specified VM Options as:
and have a source like:
Pressing F12 on any instance of Could you please provide reliable reproducible steps? Thanks! |
@lahodaj Okay, so it worked with GSON on my end too. My guess is something in the decompiler silently fails with some byte code level Now the question is how can tools/users who just download deps directly best inform vscode of those paths. Relative paths and argfiles both not working is a bummer + editing json is unideal (but probably workable; at least for a tool. For a human...) |
I am looking into supporting relative paths(*) and argfiles. It is a bit tricky, but probably doable. Note that there are limits on sharing the configuration - the path separator is different between Windows and Linux/Mac, so sharing the configuration across platforms is not very easy. (*) there is the obvious question "relative to what". There are many possible answers, but I think I'll try to go with "the enclosing workspace folder", if I can. (As a side note, I would say the lack of source (or at least javadoc) bundles is likely to have a detrimental ongoing effect on the usability of the setup. But, it is difficult for the extension to download the source bundle in this setup, where there is no project description/metadata, and where all there is is a collection of jars with indeterminable origin.) |
Well, for the use cases we are talking about
So i'd say thats a workable tradeoff.
Not too insane to maybe make people write
Known and noted. |
I have no doubt it is a workable tradeoff. What I am trying to say is that if you are serious about developing using this mode, someone needs to work that out. And, given there is (per my understanding) no "standardized" configuration in tools like (Looking for pom.xml is nice, as long as the only place one wants to support is the one well-known repository. Note this is different for Maven - the extension can read the Maven configuration, as that is declarative and defined, and can do what is needed based on that.) |
This is one part a question and one part, I assume, a feature request.
How can I teach the extension about dependencies that I am going to put on the classpath/modulepath which do not come from a
pom.xml
orbuild.gradle
definition?My situation is that I am generating files which have the path I intend to use and supplying those to
java
/javac
via an argfile.Example:
deps
:Though I can easily imagine someone else wanting to just use a jar they have on their filesystem or something similar.
The text was updated successfully, but these errors were encountered: