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 helper: If endpoint is reset to <emptystring> in fake script, the resulting aket push command is not valid #667

Closed
Vidarls opened this issue Feb 26, 2015 · 11 comments

Comments

@Vidarls
Copy link

Vidarls commented Feb 26, 2015

Paket helper: If endpoint is reset to in fake script, the resulting command is not valid.

There should be some way of clearing endpoint to avoid getting the default /api/v2/package
Trying to do this in the build script will break the call to paket as the endpoint param is always passed.

@forki
Copy link
Member

forki commented Feb 26, 2015

you could apply the same pattern as https://github.com/fsharp/FAKE/blob/master/src/app/FakeLib/PaketHelper.fs#L58 - would that help!?

@Vidarls
Copy link
Author

Vidarls commented Feb 26, 2015

It would help that the command would be valid.

Not sure what would happen in Paket though, will not giving the endpoint resolve to the default /api/v2/package/?

@forki
Copy link
Member

forki commented Feb 26, 2015

ok. let's start from the beginning.

you don't want to specify an endpoint and you don't want it to default to /api/v2/package/? Is that correct?
Yes then we need to change something FAKE and Paket. Not sure what the best way is.

@Vidarls
Copy link
Author

Vidarls commented Feb 26, 2015

Not sure this is worth pursuing if it means making big changes due to my fringe needs.

In my case it occured cause I have the complete address to the endpoint in the URL, and I did not want the default endpoint stuff appended to it. I could just split it into URL: http://host, Endpoint : /The/rest, and as such go on happily.

But I feel there might be a violation of the principle of least surprise somewhere here.

@forki
Copy link
Member

forki commented Feb 26, 2015

I agree we should only append the default endpoint if we detect that there is no endpoint in the url.

I suggest the following changes:

  1. In Paket we decide if we have to append the default endpoint if no endpoint was given. But how?
  2. In Fake we only call paket with the endpoint if someone explicitly specified an endpoint.

I can do 2) can you help with 1)?

@Vidarls
Copy link
Author

Vidarls commented Feb 26, 2015

Sure, but how can we reliably know?

We could look at what Nuget does: fsprojects/Paket#651 (comment) wich seems to be: if Host-only then url + endpoint else url
No sure how this would fork for MyGet as @maartenba mentions in fsprojects/Paket#651 (comment) myget requires the api part, but the streams are given as this : https://www.myget.org/F/aspnetwebstacknightly/

Not quite sure how to proceed without giving someone somewhere a nasty surprise.

Should we start with a naive if Host-only then url + endpoint else url then proceed with edge cases as they are reported?

@forki
Copy link
Member

forki commented Feb 26, 2015

yes let's start simple. It seems we can't solve every quirk in one go.

@maartenba
Copy link

MyGet users typically know to append this manually, so feel free to proceed that way without MyGet specific conventions.

@forki
Copy link
Member

forki commented Feb 26, 2015

(the FAKE part is done)

@Vidarls
Copy link
Author

Vidarls commented Feb 26, 2015

Ok, I will have a look at the Paket part this evening

@Vidarls
Copy link
Author

Vidarls commented Feb 27, 2015

Then I suppose we can close this?

@Vidarls Vidarls closed this as completed Feb 27, 2015
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

No branches or pull requests

3 participants