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

Enable a sample-first development experience for new packages #11378

Closed
xirzec opened this issue Sep 21, 2020 · 4 comments
Closed

Enable a sample-first development experience for new packages #11378

xirzec opened this issue Sep 21, 2020 · 4 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library.

Comments

@xirzec
Copy link
Member

xirzec commented Sep 21, 2020

Today authoring samples is very difficult (no good IntelliSense) and is oriented towards providing content that will work on docs.microsoft.com.

However, it is very useful for a library author to be able to interactively build up a sample program while they are testing out and designing their new client. As such, I'd like to accomplish the following:

  1. A library author can easily create a new local-only sample that they can build against their in-development package (and later turn into a "real" sample to publish.)
  2. IntelliSense/authoring should work just as it would in the final package.
  3. Running the sample (e.g. from a VS Code task) should be easy and include the ability to debug via breakpoints.

This will put us on-par with other languages (e.g. C#) in allowing library authors to get a sense of the developer experience they will be providing to customers, even before their library is fully functional/implemented.

@xirzec xirzec added the Client This issue points to a problem in the data-plane of the library. label Sep 21, 2020
@xirzec xirzec added this to the MQ-2020 milestone Sep 21, 2020
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Nov 16, 2020

@willmtemple Do we see an overlap between this issue and #7651 and
#10334 ?

@willmtemple
Copy link
Contributor

@ramya-rao-a Yes. One very simple way that we could enable a better experience than we have now is if we can set up a post-install hook using Rush to link the samples to the development package. This is what I do locally on my development machine with dev-tool samples dev, which creates a symlink that allows samples to resolve the package.

With a more fully-featured samples management process, we can make it work out of the box by keeping the samples in the tsconfig project tree. If we do that, then we can also debug them using the same settings as for tests and package code. This is effectively what C# does, but they don't publish their samples as source code projects like we do, and they don't have to support two languages like we do. We will have to do a little more work to move things around and keep them in the right shape.

@xirzec
Copy link
Member Author

xirzec commented Jul 26, 2021

I feel like the current sample authoring experience is pretty good now. @willmtemple is there anything we still need to do here?

@witemple-msft
Copy link
Member

@xirzec closing, as new packages should be able to easily start with samples.

@xirzec xirzec removed this from the Backlog milestone May 17, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

No branches or pull requests

4 participants