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

Paket directive #1224

Merged
merged 2 commits into from Feb 27, 2017
Merged

Conversation

glennblock
Copy link
Contributor

@glennblock glennblock commented Feb 27, 2017

For #1220

This is mostly a hack.

I've added support for paket directives in the REPL. This calls to the shim code which creates a paket.dependencies file, and calls to paket to install the packages and to create the load script.

@glennblock glennblock merged commit 4584d4e into scriptcs:paket-directive Feb 27, 2017
@glennblock
Copy link
Contributor Author

@smoothdeveloper, one thing that is not working correctly right now is that the paket.dependencies file and packages are always installed in a temp folder, as it the load script. It seems like the paths / FileInfo object that are passed are ignored.

@glennblock
Copy link
Contributor Author

What does work though in the REPL, is you can use a #r like #r "paket:nuget netwonsoft.json and it will get installed / the load script will be generated, just not in the right place.

@glennblock
Copy link
Contributor Author

Another issue is the fs code requires that paket.exe be in a .paket folder local to the script or in a parent folder. For scriptcs this is a little weird, I'd like to be able to pass in the folder where paket.exe is located. The user shouldn't HAVE to worry about it. One option is i could copy paket.exe in for them, but that slows down startup and such.

@smoothdeveloper
Copy link

that the paket.dependencies file and packages are always installed

I think that is expected, what is happening is that we find the file if it exist, and copy it to alter it in the temp directory. @forki can probably confirm.

I'd like to be able to pass in the folder where paket.exe is located

yes we will add a way to pass preliminary search paths as arguments (to be scanned first), thinking we could also handle $PATH which isn't the case yet.

That being said, the way it works now is idiomatic to paket usage in the while, so it will work for paket users.

Copy link

@smoothdeveloper smoothdeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff :)


if (argument.ToLower().StartsWith(Constants.PaketPrefix))
{
if (!context.CustomReferences.Contains(argument))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe consider trim on the argument, it avoids trailing space (on both ends) to mess with duplicate handling you have in place.

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

Successfully merging this pull request may close these issues.

None yet

2 participants