-
Notifications
You must be signed in to change notification settings - Fork 676
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
[WIP] - csproj intellisense #1214
Conversation
Hi @cmurczek, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! TTYL, DNFBOT; |
|
||
test('Retrieve packages from NuGet Gallery', () => { | ||
let partialPackageId = 'newtonsoft'; | ||
let target = new PackageManager(platformInfo, logger); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that PackageManager in the VS Code extension has nothing to do with NuGet.
@DustinCampbell: Travis CI fails when I call |
src/nuget.ts
Outdated
|
||
fs.readFile(nuGetConfig, 'utf-8', (err, data) => { | ||
if (err) { | ||
reject('Reading ' + nuGetConfig + ' failed with error ' + err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this will just carry below trying to access data
. I suspect you want to return here.
PlatformInformation.GetCurrent() calls our Since you're just checking whether you're on windows, you might consider just checked |
You should also be aware of this PR: #224. We'll be taking this soon to pull project.json completion into C# for VS Code (it lives in VS Code today). We'll want to unify these two to have the same behavior. |
yeah, I'm using that one as a template. The I'll refactor some more to mock away as many dependencies as possible and the push another update. |
@cmurczek, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
Please don't over mock if you feel like you're going too far. After all, the tests run inside of VS Code to provide access to various VS Code services. So, if you must use |
And we're back on track. Thx for the heads up regarding test environment. I was coming from the fact that, the tests as they were, were dependent on an actual nuget.config file being present on the target system. Which in case of Travis CI is probably not the case. After refactoring processing of the config is separated from loading it from the file, so we're good, even on servers without any nuget installation/config. There's however the question of testing the |
I wouldn't bother deriving from |
I just wanted to point out that I've updated the PR for moving project.json completion and hover support into C# for VS Code: #1236. I'll likely be merging this soon. When I do, you might want to rebase onto the latest master. |
Thx for letting me know. Will update when you signal. I guess that means I'll be tasked with unifying both of them too? On a different note: What's your opinion on running live http-requests during tests? Right now Mocha flags them as slow, <1s but still. If it bothers you I could look into stubbing https calls using sinon, playing back canned responses. Might be worth the work anyway for the consistency of test data alone. Let me know. |
I'm not expecting you to unify them. They can be separate for now and we can a work item to unify them later. You can stay focused. 😄 |
FYI that I merged the project.json IntelliSense yesterday. |
4eccbe8
to
3f424c9
Compare
the NuGetClient takes the activePackageSources from user scope NuGet.config and extracts the needed urls from the package source's index
probably needs more tests and mocking/stubbing of http calls
I had to update node from 4.4.5 to 6.9.5 in order to successfully complete the npm run compile script. Before the update it failed due to an unexpected = in executeChildProcess's parameters in common.js
this removes dependencies on external services (stubbing of http calls) as well as dependencies between tests
3f424c9
to
6da0224
Compare
Would this be easy to extend now @DustinCampbell? |
This being the project.json infra you already merged? |
Will this only read PackageReferences via .csproj or will the extension allow loading of any arbitrary extension as long as it is an MSBuild project? |
@borgdylan: I'm not sure I understand your question. |
Will it be hardcoded to project that use ".csproj"? Or will it allow projects that are .".fsproj" etc. Intellisense for NuGet package versions is not C# specific and should be available for any project or else put in a separate extension that is generic. |
@borgdylan: For C# for VS Code, it'll be specific to .csproj. |
So... Is this an abandoned project? |
It seems like it might be. I'm awaiting @mlorbetske to deliver me a NuGet package of https://github.com/dotnet/ProjFileTools so we can use that within OmniSharp and provide completion to C# for VS Code. |
Sorry for the delay, I've been swamped of late. I got the go ahead to make a package for the project file tools earlier this week, just need to update the build and find someone to upload it to NuGet under one of the official accounts. I could also make it available on MyGet earlier (tonight maybe?) if that'd help. |
Filed dotnet/ProjFileTools#10 to get the packaging going as part of the official build. For the time being, the package is available as ProjectFileTools.NuGetSearch v1.0.0 on https://dotnet.myget.org/F/temp-projfiletools/api/v3/index.json. |
Sorry I went AWOL for a couple of weeks. I'll have a couple of hours to kill while traveling tomorrow. I could try to wrap it up then, but I guess using the same told as VS2017 would be preferable. @DustinCampbell let me know |
Any progress? This would be very useful. |
any plan? I Wait for this thanks :) |
Hi. Just stumbled across this PR and, in case anybody's still wondering about intellisense for .csproj files (or any MSBuild project file, really), there's a separate extension that does this: https://marketplace.visualstudio.com/items?itemName=tintoy.msbuild-project-tools |
Given that it's been a year, I'm going to go ahead and close this PR. @tintoy's msbuild-project-tools extension is an excellent alternatively. |
preliminary task list to fix #1156
NuGet Gallery still runs on V3. I will get the feeds from the user scoped nuget.config, that way it'll "auto-update" as soon as the new api is referenced there. I'll put a test in for the feed name to make sure smthg breaks when that happens.
enhance PackageManagerintroduce NuGetClient