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

Local dependencies, project mode, and folder mode #7565

Open
JonathanStarup opened this issue Apr 10, 2024 · 2 comments
Open

Local dependencies, project mode, and folder mode #7565

JonathanStarup opened this issue Apr 10, 2024 · 2 comments
Labels
bug Something isn't working student programmer Relevant for student programmers

Comments

@JonathanStarup
Copy link
Contributor

folder mode includes arbitrary deps in libs/ folder while project mode does not.

Two issues

  • folder mode and project mode disagree
  • project mode does not have a way to include non web dependencies
    • I propose to support local url/uri (not libraries) like file://...
@LionelMeli
Copy link
Contributor

LionelMeli commented Apr 13, 2024

Hello Jonathan,

for project mode currently, there is a workaround to include non web dependencies:

  • Add in lib/external all the jar files (you can get all the jar files depencies through Maven or Gradle in another project)
  • Go to the lib/external and after "generate" the stuff for flix.toml: e.g. in lib/external command line: println ""%s" = "url:https://dummy.org/anonymous.jar\"\n " $(ls -1 *.jar)
  • Copy paste in the [jar-dependencies] the result of the command above
    You should have something like:
    [jar-dependencies]
    "foo.jar" = "url:https://dummy.org/anonymous.jar"
    "bar.jar" = "url:https://dummy.org/anonymous.jar"
    etc...
    (the compiler checks if the files mentionned in flix.toml are in lib/external or not. If not Flix tries to download them)

@magnus-madsen magnus-madsen added bug Something isn't working student programmer Relevant for student programmers labels Apr 14, 2024
@magnus-madsen
Copy link
Member

I would propose to sync how VSCode and flix.toml is handled.

In addition, I would add support for local JARs to flix.toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working student programmer Relevant for student programmers
Projects
None yet
Development

No branches or pull requests

3 participants