question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Project references

See original GitHub issue

Is your feature request related to a problem? Please describe. Similar to the current %package magic in IQ# (exposed as qsharp.packages in the Python client), it would be nice to have a %project magic that adds a reference to a .csproj file containing Q# code. This would make it easier to use Visual Studio or Visual Studio Code intelliSense features with Python hosts by providing the appropriate information to the language server about Q# compilation units. This feature would also make it easier to package Q# code along with Python hosts without having to depend on assumptions about the current working directory.

Describe the solution you’d like A magic command of the form %project ../path/to/project.csproj would cause the following to occur:

  • project.csproj would be added as a project reference to the current IQ# session.
  • If project.csproj is not up to date, it would be rebuilt and its build artifact (assembly) added as a reference to all future snippets.
  • Upon %workspace reload, referenced projects would be rebuilt if out-of-date.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rmshaffercommented, Jul 29, 2020

Woooo this is On Deck!!! 💖💖💖

@crazy4pi314, glad you’re excited about it! I’ve put some details about the proposed implementation in the initial PR https://github.com/microsoft/iqsharp/pull/233. Any feedback or suggestions are more than welcome, either here or in the PR.

1reaction
crazy4pi314commented, Jun 9, 2020

So if I can add some more context to what @glassnotes was was saying we are working on developing a library for Q# here: qRAM.

For nuget packaging purposes, we have the source for the library in a separate directory from the samples which is what @glassnotes was working on at the time. We can use the %package command and adding a custom nuget feed for our GitHub published nuget package (will go to nuget.org once closer to finished) but then if you are debugging or working on the library you have to push a new packaged version to be able to use it from Python. I don’t think having it in the same folder is really a solution that will work here, so in the meantime, I have written a C# host that can have the project reference. I would much rather do it in Python as we want to use it to generate the testing data/plot results but I also don’t want to keep forgetting that I have to re-publish the library to use it from %package.

Basically tl;dr it would be nice to have feature parity between using Python as a host and using a C# host as most of my academic colleagues use Python.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Project References - TypeScript: Documentation
Project references are a new feature in TypeScript 3.0 that allow you to structure your TypeScript programs into smaller pieces.
Read more >
Breaking down TypeScript project references | by Jake Ginnivan
TypeScript project references are a reasonably new feature in TypeScript which allows you to break your project up into a number of smaller ......
Read more >
Manage references in a project - Visual Studio (Windows)
Project-to-project references are references to projects that contain assemblies; you add project references by using the Projects tab of the ...
Read more >
Boost your productivity with TypeScript project references
Project references are specified via a references array of objects with a path property. The path property is a relative path to a...
Read more >
Using TypeScript Project References to share common code
Project references allow you to structure your TypeScript programs into smaller pieces. By doing this, you can greatly improve build times, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found