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

Documentation from NuGet package #254

Closed
TysonMN opened this issue Dec 13, 2020 · 13 comments · Fixed by #255
Closed

Documentation from NuGet package #254

TysonMN opened this issue Dec 13, 2020 · 13 comments · Fixed by #255

Comments

@TysonMN
Copy link
Member

TysonMN commented Dec 13, 2020

I expected PR #251 to bring documentation to the tooltips in Visual Studio when consuming Hedgehog via NuGet package. I locally created a NuGet package (thanks to PR #253) and added it to a project, but I still don't see the documentation. I was talking with @dharmaturtle, and he has the same behavior.

@cmeeren, do you see the documentation in tooltips from a locally created NuGet package?

@cmeeren
Copy link
Contributor

cmeeren commented Dec 13, 2020

How did you build the new package and add it to the project? If you did not bump the version, you must ensure that you remove the old cached Hedgehog version from your global NuGet cache, otherwise it's the existing cached version that gets restored.

(Clearing the cache for Hedgehog would be wise anyway both before and after testing, otherwise you may have your custom one getting restored everywhere else.)

@cmeeren
Copy link
Contributor

cmeeren commented Dec 13, 2020

If you did not bump the version, you must ensure that you remove the old cached Hedgehog version from your global NuGet cache, otherwise it's the existing cached version that gets restored.

Also, I think you must clean your project if you had already installed Hedgehog, otherwise it won't install/restore anything (since it is already restored).

(I am actually currently working on a build-tool library where I'm required to perform these steps every time I update the library and want to test it.)

@dharmaturtle
Copy link
Member

dharmaturtle commented Dec 14, 2020

Here's where you can add a new package source in VS (Tools > Options):

image

Docs don't appear for Range.exponentaial for me, though they do appear for the __ prefixed methods below it (e.g. __exponentialBoundedDecimal).

image

As you can see I bumped the version to 0.8.555. I also tested with 0.8.5. Note the package source in the upper right corner.

Interestingly enough, the docs for Hedgehog.Experimental work for me (both the official nuget version and my own custom built Hedgehog.Experimental.0.2.444.nupkg.


You may wish to clean up the %userprofile%\.nuget\packages\hedgehog and %userprofile%\.nuget\packages\hedgehog.experimental directories if you install a new version. I'm not sure what happens if later a "real" release comes out with a version number you were previously testing with.

@dharmaturtle
Copy link
Member

dharmaturtle commented Dec 14, 2020

Ah, this is due to the fact that we're prepending - to the CompiledName.

image

@TysonMN
Copy link
Member Author

TysonMN commented Dec 14, 2020

Excellent work @dharmaturtle!

@moodmosaic, what is the purpose for - in compiled names?

@dharmaturtle
Copy link
Member

@TysonMN #219

@cmeeren
Copy link
Contributor

cmeeren commented Dec 14, 2020

@moodmosaic What's the purpose of all the __-prefixed stuff? If it is intended as implementation details, but has to be public due to being used in inline code, then it's much better to annotate it with [<EditorBrowsable(EditorBrowsableState.Never)>] (requires open System.ComponentModel).

@moodmosaic
Copy link
Member

What's the purpose of all the __-prefixed stuff?

It turns out that those can't be used outside F#, so we try to 'hide' them from IntelliSense: #156 (comment)

to annotate it with [<EditorBrowsable(EditorBrowsableState.Never)>] (requires open System.ComponentModel).

I've tried that, of course, but then they were hidden also from inside F#'s IntelliSense: #156 (comment)

@moodmosaic
Copy link
Member

@TysonMN, @dharmaturtle, @cmeeren, if they are causing some unexpected behavior, now it's time to do something for it, before cutting a release. Though, I (and I believe also @mausch) couldn't see anything unusual in Rider.

@dharmaturtle
Copy link
Member

Changing the - to a backtick ( `) resolves this issue for Visual Studio:

image

Exponential is still hidden from C#:

image

And still works for Rider:

image

I can make a PR for this if yall like this solution.

@moodmosaic
Copy link
Member

Awesome! Go for it, @dharmaturtle 🎸

@moodmosaic
Copy link
Member

@cmeeren, are you fine waiting for a PR by @dharmaturtle? Might push v0.9.0 release to Wednesday or Thursday.

@cmeeren
Copy link
Contributor

cmeeren commented Dec 15, 2020

That's fine with me, I'm in no hurry.

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 a pull request may close this issue.

4 participants