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

Install dependencies of build script. #2100

Closed
nojaf opened this issue Sep 24, 2018 · 16 comments
Closed

Install dependencies of build script. #2100

nojaf opened this issue Sep 24, 2018 · 16 comments

Comments

@nojaf
Copy link
Contributor

nojaf commented Sep 24, 2018

Description

I'd like a way to download dependencies of the build script without invoking anything else.

Scenario:

I want to add a new module nuget Fake.JavaScript.Npm.
Before I can add open Fake.JavaScript I need to have that dependency installed.

Repro steps

Please provide the steps required to reproduce the problem

  1. Delete build.fsx.lock file

  2. Run fake.exe run build.fsx --help

With --help no target is invoked it does contain side effects however.

Expected behavior

I'd be nice if there were a fake.exe install to fetch the new dependency.

Possible Solutions

Option fake install

Similar to paket install. Open points: Would it write/update the intellisense file -> probably yes

Option fake update

Similar to paket update. Open points: Would it write/update the intellisense file -> probably yes

Option fake paket <..>

Will execute paket <..> (internally). And write/update intellisense files if needed?

Option fake compile

Will execute something similar to paket install (ie. add/download new packages), update intellisense files and compiling the script (without running it). fake run should be fast and cached afterwards.

This option could have additional parameters in the future:

  • fake compile --update to update dependencies similar to deleting the lockfile and paket update
  • fake compile --no-install to only compile and without paket install
@matthid
Copy link
Member

matthid commented Sep 26, 2018

After discussing what the CLI should look like (fake install, fake update, fake prepare, fake download, fake restore ...) I'd accept a PR for this. From time to time I thought about this as well. (you should feel free to send a PR as changing the CLI shouldn't be a problem)

@nojaf
Copy link
Contributor Author

nojaf commented Sep 27, 2018

Hi @matthid , thanks for the approval.
Could you give me some directions on getting started?
What should the cli look like? Could it be an option to just do something like fake.exe paket <command> and act accordingly?

@matthid
Copy link
Member

matthid commented Sep 27, 2018

That would be an even bigger change and probably be seen sceptical by some users. It would need a change similar to fsprojects/Paket#3338 before we can start here

@BlythMeister
Copy link
Contributor

If I understand your aim is to perform the compile stage of running fake. Without running your script.

So why not use a similar syntax to ’fake run <script>‘ and do ’fake compile <script>‘

@baronfel
Copy link
Contributor

baronfel commented Sep 27, 2018

An additional thought I had with @TheAngryByrd tonight would be to package up that compiled version of the fake-script dll into a single deployable artifact somehow. Ideally a .net core static-linked exe, but that might not be feasible.

@matthid
Copy link
Member

matthid commented Sep 27, 2018

@baronfel Yes I thought about that as well, this is useful especially for release pipelines, however this is a separate issue imho

@matthid
Copy link
Member

matthid commented Sep 27, 2018

@BlythMeister I like fake compile as well

@nojaf
Copy link
Contributor Author

nojaf commented Sep 27, 2018

@matthid just to be on the safe side, what does fake compile do for you?
I'd like something that installs my fake deps. Compile sounds like you will compile that fsx to a dll?

@matthid
Copy link
Member

matthid commented Sep 27, 2018

@nojaf Yes it would do everything, load all deps, generate intellisense files and compile the script (cached behind the scenes), such that everything is ready for fake run

@matthid
Copy link
Member

matthid commented Sep 27, 2018

And it really would be a fake specific operation and could have options like fake compile --no-install to skip the paket install step if needed

@nojaf
Copy link
Contributor Author

nojaf commented Sep 27, 2018

Ok, would you mind writing out a small summary of all the commands. What each should do?
I could perhaps start then with fake install and fake update.

@matthid
Copy link
Member

matthid commented Sep 27, 2018

Imho the commands are different ways to solve the problem of this issue. I'll update the first post

@matthid
Copy link
Member

matthid commented Sep 27, 2018

Hope the suggestions make more sense now and capture the current discussions

@matthid
Copy link
Member

matthid commented Nov 14, 2018

Anyone care to send a PR for this? (Currently I'd probably favor fake compile)

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2019

There has not been any activity in this issue for the last 3 months so it will be closed in 14 days if there is no activity.

@matthid
Copy link
Member

matthid commented Jun 23, 2020

Related: #1783

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

No branches or pull requests

4 participants