Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 10 | Comments: 34

filter by tags archive

RavenDB 1.0 & Newtonsoft.Json 4.5.7

time to read 1 min | 133 words

A common complaint that we hear about RavenDB 1.0 is that it depends on Newtonsoft.Json 4.0.8, while many libraries are already using 4.5.7. We already resolved the problem once and for all in the RavenDB 1.2 branch, but that is a few months from going live yet.

Therefor, we create a new nuget package: http://nuget.org/packages/RavenDB.Client/1.0.971

This nuget package is the exact same as 960, except that we compiled it against Newtonsoft.Json 4.5.7. Note that this is only supported for the client mode, if you want to run RavenDB Server or RavenDB Embedded, it is still going to require Newtonsoft.Json 4.0.8 in the 1.0 version.

The main idea is that you can get to run against RavenDB Server using Newtonsoft.Json 4.5.7 on the client side, which is the most common scenario for RavenDB.


Comments

David

That's great news Ayende, thanks!

/David

Marcos

You can try with ILMerge with /internalize option to hide the json dependency and provide some wrappers if you already return objets of the Newtonsoft library.

Cheers

Roger

I would like to hear more about how you solved it in 1.2. I am about to release an update to Gallery Server Pro that includes this library, and I want to avoid the pitfalls.

Louis

They are using git subtree (https://github.com/ayende/ravendb/blob/1.2/Imports/Pull.ps1) to pull in the sources. After that they do a find&replace to prefix the namespace with Raven.Imports (https://github.com/ayende/ravendb/commit/d3ee433ab4e5a8871a2d5772b4634fef166b224b)

Ayende Rahien

Roger, For 1.2, we internalized json.net

Roger

Ayende: What do you mean by "internalize"? Are you talking about embedding the json.net DLL inside another DLL?

LaptopHeaven

Are you planning on releasing a RavenDB Client MvcIntegration nuget package which depends on 1.0.971?

Dan Turner

Damn... I would really like a similar version of RavenDB.Embedded :(

I'm guessing this is non-trivial for you guys to do?

Ayende Rahien

LaptopHeaven & Dan, this is a interim release, and a small one at that, we don't want to do the full work required to move to 4.5.7 for the entire product. There are a LOT that is going on there. That is why we released just the stuff that is required to work with a remote server.

Dan Turner

Fair enough mate!

Do you have any ETA on the next stable version of the embedded package that is compatible with Newtonsoft.Json 4.5.8?

Ayende Rahien

Dan, A couple of months, I guess.

nicolas

just moved a project and those dll issues were quite a pain. for some reason, the nuget kept referencing the dlls in the bin/ directory. it is a good thing you internalize and minimize dependencies. those dependencies woes have been around since the dark age of computing. i am dreaming of a definitive, bullet proof, and simple, solution to it.

Koen Verheyen

I'm not totally convinced internalizing is good. I want to put my models in a common portable assembly between a web api (requires >= Json 4.5.8) server with ravendb client and a windows phone app. My models have json ignore attributes (to direct ravendb) but with the internalized json I would have to reference ravendb.client in my common assembly (which is not even possible).

Does that make sense or am I breaking any ground rules? Or should I be using linked files instead of common models?

Ayende Rahien

Koen, You can customize the ravendb json serializer to ignore those attributes, but yes, that is the idea. Considering how many json.net version there are out there, there is really no other real choice for us.

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

  1. Production postmortem: The case of the memory eater and high load - 2 days from now
  2. Production postmortem: The case of the lying configuration file - 3 days from now
  3. Production postmortem: The industry at large - 4 days from now
  4. The insidious cost of allocations - 5 days from now
  5. Find the bug: The concurrent memory buster - 6 days from now

And 4 more posts are pending...

There are posts all the way to Sep 10, 2015

RECENT SERIES

  1. Find the bug (5):
    20 Apr 2011 - Why do I get a Null Reference Exception?
  2. Production postmortem (10):
    14 Aug 2015 - The case of the man in the middle
  3. What is new in RavenDB 3.5 (7):
    12 Aug 2015 - Monitoring support
  4. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats