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

LINQPad samples #505

Closed
shiftkey opened this issue Jun 4, 2014 · 17 comments
Closed

LINQPad samples #505

shiftkey opened this issue Jun 4, 2014 · 17 comments
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation

Comments

@shiftkey
Copy link
Member

shiftkey commented Jun 4, 2014

http://www.linqpad.net/nugetsamples.aspx

cc @distantcam

@shiftkey
Copy link
Member Author

Taking this off my radar for the foreseeable future.

@naveensrinivasan
Copy link

@haacked I wanted to check if this something that we want to do now.

IMHO having samples would greatly improve people using this for their needs. I think linqpad is a great tool for doing that without much of ceremony. I use it very often to try out new API's.

Based on this I forked @shiftkey https://github.com/naveensrinivasan/octokit-linqpad-samples and updated with some more samples.

I updated the octokit's Nuspec locally with the linqpad-samples
linqpad-samples

and when I use this nuget package it comes up with the samples in linqpad
samples

samples-treeview

If it is interesting, then I could a do a PR with

  • the samples,
  • updated the build to include the linqpad samples and
  • also include a test to make sure any changes don't break the samples.

@haacked
Copy link
Contributor

haacked commented Sep 28, 2015

Should this go in the main Octokit package or perhaps a special samples package? For example, we may want to create Octokit.Linqpad and Octokit.Reactive.Linqpad.

@naveensrinivasan
Copy link

I agree it could more of like Octokit.Samples where we could use one of the options as Linqpad and we could use the same samples for XS/VS project sample.

@hnrkndrssn
Copy link
Contributor

👍 for it to be it's own package

@M-Zuber
Copy link
Contributor

M-Zuber commented Sep 28, 2015

I would also prefer to have a separate package

@shiftkey
Copy link
Member Author

shiftkey commented Oct 3, 2015

Should this go in the main Octokit package or perhaps a special samples package?

The general guidance from the Linqpad site is to contain them in the main package:

  1. Update your NuGet packing script to copy your samples into a folder called linqpad-samples.
  2. Add the linqpad-samples tag to your NuGet submission to ensure free access.

I gather this means the user will have them automagically after installing (rather than digging around for a second package). The site says you can have a separate package - if you're so inclined - but I'm not sure of the harm here if we do keep it all in one spot.

Also, I'm not sure what that last step means.

@naveensrinivasan
Copy link

Here is a sample Octokit.samples.0.0.1.nupkg which would automatically show up in the linqpad samples.

Should it be original nuget package or should be a separate nuget package?

@hnrkndrssn
Copy link
Contributor

Also, I'm not sure what that last step means.

From the nuget.org docs

tags
A space-delimited list of tags and keywords that describe the package. This information is used to help make sure users can find the package using searches in the Add Package Reference dialog box or filtering in the Package Manager Console window.

I guess LINQPad might be using that to determine if the package should be shown in the free version or not...

@hnrkndrssn
Copy link
Contributor

And after thinking about this a bit more, I'd like to revise my vote for it to be in it's own package...as if I'm interested in the LINQPad samples, I'm obviously wanting to do something with octokit and then I'd have to install both the samples package AND the actual package...

@haacked
Copy link
Contributor

haacked commented Oct 4, 2015

I think the issues for me is I have no idea how many people use LINQPad. I don't use it so this feature doesn't really matter much to me. Will there be other tools that want their own proprietary formats in our packages?

If a lot of you DO use LINQPad, I will relent and go with it because I don't feel too strongly about it.

@haacked
Copy link
Contributor

haacked commented Oct 4, 2015

could someone post what an example might look like? Perhaps if we could link to the examples in the README and make sure they're human readable as well as LINQPad readable, I'd be more favorable. That way they're useful to folks who don't have LINQPad installed.

Also, I'm concerned about the maintenance cost of these samples over time. If they're not compiled and run as part of our CI, then they'll bit rot over time. Would someone sign up and figure out a way to do that? (Roslyn to the rescue?)

@distantcam
Copy link
Contributor

.linq files have a little bit of XML header, and then the actual code. They are very human readable.

For example https://github.com/naveensrinivasan/octokit-linqpad-samples/blob/master/1-introducing-octokit.linq

LinqPad can run scripts on the command line (https://www.linqpad.net/lprun.aspx) and output them. Then you could use approval tests on the output.

And if I have any sway over it, I'd like to see the samples in the main package. That way if you use LinqPad to experiment with nugets (which is a common use case of LinqPad) the samples are right there. Con is the package has some extra text files if you don't use LinqPad.

@haacked
Copy link
Contributor

haacked commented Oct 4, 2015

Con is the package has some extra text files if you don't use LinqPad.

So I'm 👍 for adding these to the main package if we:

  • Write useful samples that we can link to in the README and can be read nicely online.
  • Make sure our CI validates the samples somehow.

@naveensrinivasan
Copy link

The linqpad has compilation options for compile check. https://www.linqpad.net/lprun.aspx

The -compileonly switch tells lprun to check that the query will compile, without actually running anything.

I was planning to use that feature in the CI build to make sure the commits don't break the samples.

@haacked
Copy link
Contributor

haacked commented Oct 4, 2015

I was planning to use that feature in the CI build to make sure the commits don't break the samples.

👍

@naveensrinivasan
Copy link

Implemented this in #921

@nickfloyd nickfloyd added Type: Documentation Improvements or additions to documentation Status: Up for grabs Issues that are ready to be worked on by anyone and removed category: docs-and-samples labels Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

7 participants