fslaborg / Deedle

Easy to use .NET library for data and time series manipulation and for scientific programming
http://fslab.org/Deedle/
BSD 2-Clause "Simplified" License
933 stars 195 forks source link

add lib/net40 search path, make it work with paket #292

Closed ascjones closed 9 years ago

ascjones commented 9 years ago

When installing with paket, the Deedle.dll is in lib/net40 relative to Deedle.fsx, so added this search path to make it work.

tpetricek commented 9 years ago

Thanks for the PR - we should definitely support referencing Deedle via Paket.

I'm a bit confused though - in what case does Paket put binaries under lib/net40?

I thought that in a typical scenario, they'll be in packages/Deedle/lib/net40 (without the version number). So I thought we'd need to add:

#I "../packages/Deedle/lib/net40" 
#I "../../packages/Deedle/lib/net40" 
#I "../../../packages/Deedle/lib/net40" 
ascjones commented 9 years ago

Doesn't it depend on the relative path of Deedle.fsx?

My installation with paket puts the script in packages/Deedle/Deedle.fsx so the lib/net40 is the relative path to the binaries. I then load it from my script with:

#load "../../../packages/Deedle/Deedle.fsx"

Adding the other path hints you suggest would make it work in scenarios where Deedle.fsx was located outside the packages directory somewhere in the source tree?

tpetricek commented 9 years ago

Hmm.... that is a very good point. What you're saying makes complete sense.

I wonder what was the reason for including the full path the way we do it. It might be the case that some earlier version of F# used to always resolve the #I directives relatively to the original source file (rather than relatively to Deedle.fsx), but I cannot reproduce this in any VS I have on my machine...

Because with the line you added, we should probably drop all the ones that go outside of the packages directory.

tpetricek commented 9 years ago

/cc @dsyme @latkin @KevinRansom - Was there any change, recently, in how the directories of #I are resolved when loading an fsx script from a subdirectory?

ascjones commented 9 years ago

@tpetricek perhaps the nuget install used to (or was intended to) copy Deedle.fsx to your project dir, from where those other relative paths would work.

tpetricek commented 9 years ago

I think this is just some silly leftover from the early days. I'll try leaving just your #r in and see if it works....