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

[nuget_model] Add support for Nuget (NuSpec) dependency groups #85

Open
Aaronontheweb opened this issue Nov 18, 2013 · 6 comments
Open

Comments

@Aaronontheweb
Copy link
Contributor

I'm considering contributing this myself, but I may not have the time to do it.

I would like to add NuGet 2.0's new dependency syntax to Albacore, which includes support for dependency groups.

The new syntax for specifying dependencies looks like this:

<dependencies> 
   <group>
      <dependency id="RouteMagic" version="1.1.0" />
   </group>

   <group targetFramework="net40">
      <dependency id="jQuery" />
      <dependency id="WebActivator" />
   </group>

   <group targetFramework="sl30">
   </group>
</dependencies>

The really powerful difference between this spec type and what the current implementation does is the ability to specify dependencies for specific .NET framework versions.

If I need to use the System.Threading NuGet package targeting .NET 3.5 but not for any other supported NuGet target, this will allow me to do it.

Looking at the code under the clean_slate branch, it looks like nuget_model.rb and its associated tests will need to be updated.

I believe we can also accomplish these changes without breaking compatibility with existing Albacore instances that use the nuspec feature.

Here's my suggestion - currently the calls to adding a new nuspec dependency look like this:

nuspec.dependency {Package Name}, {Package Version}

I'm going to propose that we add a third optional attribute, for Target Framework at the end:

nuspec.dependency {Package Name}, {Package Version}, {Target Framework}

If no Target Framework is specified, the nuspec dependency will simply be put under the default group.

@Aaronontheweb
Copy link
Contributor Author

Ah, looks like the clean_slate branch isn't ready for this yet. If I do this I'll send the PR to master

@haf
Copy link
Member

haf commented Nov 19, 2013

In what sense is not clean_slate ready for it?

@Aaronontheweb
Copy link
Contributor Author

@haf It looked like none of the other task implementations were there, so I
assumed you were still working on the guts of it

@haf
Copy link
Member

haf commented Nov 20, 2013

Ah, no, there won't be any more task implementations; most of the things in old master is wrapping a command, and that we should rather provide good facilities to do -- instead of re-wrapping the parameters in ruby. Also, by taking a larger view of the process of building a project, the task types that ARE there are now more capable.

clean_slate is rc2, so it's done. I'm waiting for bug reports; at new year we're publishing 2.0.

@Aaronontheweb
Copy link
Contributor Author

@haf so the new version of Albacore won't provide built-in tasks for NuGet, NUnit, MSBuild, etc... ?

@haf
Copy link
Member

haf commented Nov 26, 2013

yes, it does everything the previous version did with nugets, with less code with nuget_model and all the nugets_XX task types. NUnit works with test_runner very well, I've tried it. MsBuild as well as xbuild is supported with build. Are you missing anything? In that case, I do want to know!

@haf haf added the help wanted label Aug 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants