Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Executable for Spark #36

Open
balintbrews opened this issue Sep 26, 2018 · 1 comment
Open

Executable for Spark #36

balintbrews opened this issue Sep 26, 2018 · 1 comment

Comments

@balintbrews
Copy link
Contributor

Currently Spark relies on a script defined in composer.json:

"scripts": {
    "spark": "SPARK_WORKDIR=`pwd` robo --ansi --load-from vendor/bluesparklabs/spark"
},

While this minimal approach has been convenient for the initial development phase, it has its drawbacks:

  • We're imposing a setup requirement on every project that uses Spark.
  • These scripts are out of our control, meaning that we won't be able to issue updates, e.g. when we need a new environment variable, change a flag etc.
  • Command-line arguments for Spark commands don't work properly. See Command --options don't work on CLI #10.
  • Typing composer run spark every time is tedious. The recommendation has been to set up an alias (sparkcomposer run spark), which is yet another setup requirement.

My proposal is to abandon the Composer script approach, write an actual executable file for Spark and define it as a vendor binary for Composer. Executing Spark commands would happen this way:

$ ./vendor/bin/spark

On top of addressing all problems outlined above, we also open the possibility to write our own launcher, copying what Drush Launcher does, so that you could just issue the command spark wherever you are in your project.

@jameswilson
Copy link
Member

Nice sleuthing and great proposal. I agree with this 100%, and approve you to proceed, but have a couple questions.

Couple questions:

  • What is the LOE to implement? 1d? Is it something you're willing to take on or need help on? and will this help streamline the GDPR work? If not I suggest we attack this after the current sprint.
  • Can you explain a little about the executable file itself. Will it be a PHP script? or a bash/sh wrapper for a PHP executable?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants