Asset pipeline - combining sets

21 views
Skip to first unread message

James Crowley

unread,
May 19, 2012, 2:09:05 PM5/19/12
to fubumv...@googlegroups.com
I could be misunderstanding something in the docs, but it says that I
should be able to do this:

combine jquery,jquery-ui,jquery-validate as jquery-combination

However, I get an ArgumentNullException (stack trace below). It works
fine if I use combine with explicit filenames instead of other sets.
Having compiled the source code, I see this:

_graph.ForCombinations((name, assetNames) =>
{
var mimeType = MimeType.MimeTypeByFileName(assetNames.First());
_cache.AddFilesToCandidate(mimeType, name,
assetNames.Select(x => _pipeline.Find(x)));
});

with mimeType coming as null (because the assetNames don't have file
extensions) when it tries to then insert this in the cache. Is this
expected?

Thanks

J

FubuMVC.Core.Assets.AssetCombinationBuildingActivator
System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
at FubuCore.Util.Cache`2.Fill(TKey key, Func`2 onMissing) in
c:\BuildAgent\work\4a2c4b02595de142\src\FubuCore\Util\Cache.cs:line
123
at FubuCore.Util.Cache`2.FillDefault(TKey key) in
c:\BuildAgent\work\4a2c4b02595de142\src\FubuCore\Util\Cache.cs:line
118
at FubuCore.Util.Cache`2.get_Item(TKey key) in
c:\BuildAgent\work\4a2c4b02595de142\src\FubuCore\Util\Cache.cs:line 83
at FubuMVC.Core.Assets.Combination.AssetCombinationCache.AddFilesToCandidate(MimeType
mimeType, String name, IEnumerable`1 files) in
c:\BuildAgent\work\e5cfff0cc125d023\src\FubuMVC.Core\Assets\Combination\AssetCombinationCache.cs:line
30
--

---
James Crowley
CTO, FundApps - a new generation in financial services software -
http://www.fundapps.co/
Founder, developerFusion - the global developer community -
http://www.developerfusion.com/

linkedin: http://linkedin.com/in/jamescrowley
twitter: http://twitter.com/jamescrowley

Jeremy D. Miller

unread,
May 20, 2012, 8:48:05 PM5/20/12
to fubumv...@googlegroups.com
Sigh.  Can you go log an issue on this?  

Assets needs more love.
 
Jeremy D. Miller
The Shade Tree Developer
jeremy...@yahoo.com



From: James Crowley <james....@gmail.com>
To: fubumv...@googlegroups.com
Sent: Sat, May 19, 2012 1:09:06 PM
Subject: [fubumvc] Asset pipeline - combining sets
--
You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To post to this group, send email to fubumv...@googlegroups.com.
To unsubscribe from this group, send email to fubumvc-devel+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fubumvc-devel?hl=en.

James Crowley

unread,
May 21, 2012, 5:12:57 AM5/21/12
to fubumv...@googlegroups.com
Done :)

Can I also request support for multiple mime types per combination or
set? For instance, I might want to package up a bunch of JS file and a
related CSS file? And leave it to the asset pipeline to worry about
including both sets of files?

J
> fubumvc-deve...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/fubumvc-devel?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "FubuMVC Development Group" group.
> To post to this group, send email to fubumv...@googlegroups.com.
> To unsubscribe from this group, send email to
> fubumvc-deve...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/fubumvc-devel?hl=en.



Reply all
Reply to author
Forward
0 new messages