Giter Club home page Giter Club logo

Comments (6)

yusdacra avatar yusdacra commented on July 4, 2024 1

Ah, I see. Then I think an easier way might be to implement a discoverer for Scala, and then just use dream2nix on a test repo (the python discoverer is simple, so you could just modify that.). You could also do the second way I mentioned, but instead of .translate, you could build the .translateBin derivation, and use the resulting script, passing a file path containing a JSON object with source and outputFile attributes, provided your translator uses those.

from dream2nix.

nrdxp avatar nrdxp commented on July 4, 2024

okay after some initial investigation I found this commit:
489f1ab

Which seems to have removed the cli for whatever reason. But there is no explanation in the commit. If the process has changed it would be very nice to update the docs regardless.

from dream2nix.

yusdacra avatar yusdacra commented on July 4, 2024

If you are trying to test a translator, you can add sources to translate like this to your translator.

Otherwise you could also start a nix repl, :lf <path-to-dream2nix> and then you can access your translator using translator = lib.${builtins.currentSystem}.translators.translators.scala.all.<translator-name> then using the translator.translate function. You can pass an attribute set with a source specified (and a project).

This is all assuming it's a pure translator though (which seems like what you are doing).

from dream2nix.

nrdxp avatar nrdxp commented on July 4, 2024

Thank you, but unfortunately it is not a pure translator, I need to call SBT so it can fetch the Scala dependencies once, in order to be able to build the lock file.

from dream2nix.

DavHau avatar DavHau commented on July 4, 2024

In the mean time the contributors docs have been revamped and there is no mention of the cli app anymore.

Anyhow, the docs on writing an impure translator can still be improved, I guess.

from dream2nix.

DavHau avatar DavHau commented on July 4, 2024

closing in favor of: #181

from dream2nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.