Skip to content

Running tooling from scripts #4

Open

Description

@lodinukal

I want to be able to call rojo, darklua, etc from a script with arguments provided.

Activity

  1. daimond113 commented on Feb 2, 2025

    @daimond113
    Member

    The pesde repo is for pesde itself, the tooling is a separate repository. I'll transfer this issue there.

  2. transferred this issue frompesde-pkg/pesdeon Feb 2, 2025
  3. CompeyDev commented on Feb 2, 2025

    @CompeyDev
    Member

    pesde-tooling doesn't do anything special, so you should just be able to run the tool you want as usual with process.spawn and setup will be handled automatically.

    Do note that the process stderr might contain warnings or installation progress bars from pesde-tooling.

  4. daimond113 commented on Feb 2, 2025

    @daimond113
    Member

    @CompeyDev I think the issue is valid. The OP is proposing to expose a library API for the tooling packages so that another Lune process doesn't have to get spawned while they're already in a Lune process. In my opinion that's a good addition.

  5. CompeyDev commented on Feb 2, 2025

    @CompeyDev
    Member

    Oh! In that case, pesde/toolchainlib already exposes a runTool method, to which you can supply the ToolId of the tool you want to execute. For example, to run Rojo:

    toolchainlib.runTool({
        alias = Option.None,
        repo = "rojo-rbx/rojo",
        version = Option.None -- defaults to latest
    })

    If you want to avoid spawning a separate lune process altogether, you can do:

    toolchainlib("rojo-rbx/rojo")
  6. daimond113 commented on Feb 2, 2025

    @daimond113
    Member

    I think having the individual tooling packages expose a library export might be more fitting, though. Would allow user to avoid the direct dependency on toolchainlib as well as not having the versions desync (latest being different from the lockfile, for example).

  7. CompeyDev commented on Feb 2, 2025

    @CompeyDev
    Member

    I wouldn't be fully opposed to that, but this is usually only useful if you don't already depend on the tool as a separate binary dependency; so the version desync shouldn't be an issue.

  8. daimond113 commented on Feb 2, 2025

    @daimond113
    Member

    Well, pesde allows you to have both library and binary exports, so you get the benefits in 1 go. Having a library export is useful for setups like Darklua + Rojo where it is common to have a script that runs Darklua to process files, Rojo to generate a sourcemap (for Luau LSP) and a serve session.

  9. added
    enhancementNew feature or request
    and removed
    questionFurther information is requested
    on Feb 3, 2025
  10. CompeyDev commented on Sep 24, 2025

    @CompeyDev
    Member

    Recently, a few changes were made to our versioning system for packages: see CHANGELOG.md.

    This introduces some challenges with library exports, as we technically have "breaking" changes, which are related to supported runtime versions as build metadata bumps. This may be tolerable for our binaries so as the caveat is well documented, but absolutely intolerable in the case of libraries. We should reconsider if this feature is feasible given the changes in our circumstances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions