Comments (18)
Good news: I've got a working build with packages at https://ci.appveyor.com/project/highlyunavailable/consuldotnet/build/0.6.4.293-feature/netcore/artifacts
Unfortunately Semaphores (but not locks, I think) are broken in Core until Json.NET 9.0.2-beta is released and the ILRepack work for Json.NET has been dropped from the xproj and must be restored - both of these things need to happen to make this ready for primetime, but we should have full .NET Core support on or before 0.7.0 releases. Thanks a ton for the help @akatz0813 .
from consuldotnet.
@lvermeulen it's totally possible, I just haven't because I've been pretty busy this last week. I should be able to work something out this weekend though.
from consuldotnet.
Can you add a few details about what needs to be done or any problems compiling this code under DNXCore50? I'm not following the whole DNX thing that closely right now but I can get to this sooner if I have a better idea of what needs to be done.
from consuldotnet.
Alright, I think I have an idea of what needs to be done here. Unfortunately this also breaks compatibility with Visual Studio 2013 because it just goes ¯\(°_o)/¯
if you throw a project.json at it so it's a pretty big redesign of the repo to even support this.
This is on the list now. Thanks for the issue.
from consuldotnet.
This turned out to be a much, much, much bigger task than I thought it would be, mostly because in DNXCore50 they completely removed System.Net.WebRequest
/WebResponse
, which is what this package uses for all of its HTTP work.
I can't even use MSTest either, since it doesn't exist in DNXCore50 - I have to convert all the tests to XUnit.
In fact, I think this is such a big task that I'm going to roll it in with a rewrite of the entire Client portion - the public interface will stay the same, it's just that all the innards are going to have to be rewritten to use System.Net.Http.HttpClient
, and since that has to happen + all the tests have to be redone, it looks like I may as well take it further and rewrite the rat's nest of inheritance that is currently the Client.cs file.
from consuldotnet.
Okay, I've got a very simple "v1" instance of a dnxcore branch at
https://github.com/PlayFab/consuldotnet/tree/dnxcore50 but it doesn't seem to pass tests/actually work with the Core CLR - a lot of the tests fail with
Consul.KeyNotFoundException : Failed to read prefix
---- Newtonsoft.Json.JsonReaderException : JSON integer 16210313421097356768 is too large or small for an Int64. Path '[0].Flags', line 1, position 112.
Submitted issue with Json.NET: JamesNK/Newtonsoft.Json#838
from consuldotnet.
Going forward, library authors should target netstandard1.x
where 'x' is an API set. This allows any platform i.e. .NET, .NET Core, Silverlight, UWP, XBox, whatever else comes in the future to work with your library.
In terms of dev work, this means using the RC2 tooling around xproj and project.json. Since you already have that, all it means is upgrading your xproj and project.json to RC2 and changing your target framework to most likely netstandard1.3
(You should pick the lowest version possible to be compatible with the most platforms).
BTW, good work good sir. I began using Microphone but found it's API pretty closed off and broken but this is delightful.
from consuldotnet.
Holy heck did they change the name again? First it was dotnet50 or something, then dnxcore50, etc. Thanks for the warning, though. Unfortunately .NET Core support is going to have to wait until JSON.NET supports it properly (see error in this issue), though it doesn't actually support netstandard1.3
at all yet, nor does xunit it seems like.
Glad you found this useful - I haven't used Microphone, but from what I've seen of it, this is a much "lower level" API to Consul.
from consuldotnet.
Have a read. As a library author myself, it's been most annoying to keep chopping and changing, so I feel your pain.
https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md
There seems to be a 8.0.3 and 9.0 beta released. Not sure if those include your fix.
from consuldotnet.
Thanks for the info and document detailing all the changes. 8.0.3 definitely does not have it, 9.0 beta might.
from consuldotnet.
@highlyunavailable I have been spending the past few weeks porting a very large (200+) solution. Would be happy to help out. 1.0 RTM is out on Monday, and selfishly I'm trying to get all the third party libraries we use to support 1.0 as soon as possible.
from consuldotnet.
@akatz0813 I'd love some help on this since I'm not even sure what needs to be done to make it happen with all the new changes to everything, but right now the blocker is mostly Json.NET not supporting CoreCLR for this though (JamesNK/Newtonsoft.Json#838) until a possible 9.0 release.
If you want to work on it, please start from the develop
branch since it contains a number of changes to make life a lot easier for cross-platform stuff, mostly driven by trying to support Mono properly. I'm happy to answer any questions you might have as well.
from consuldotnet.
So for those following along on this issue: I managed to make a workaround in 6dd37af (not sure how fast or stable it is) to allow Json.net to work properly on Core for locks/semaphores. The tests pass but I'm still trying to figure out how to ILRepack for at least the NET451 version of this - it'd be a regression not to repack it.
from consuldotnet.
Until the whole xproj/project.json thing shakes out I can't really use msbuild targets to do the ILRepack like in the original, so it's just going to have to be done at the appveyor level. I'd say this is done and we have full functionality on dotnet core though. Due to some changes I didn't want to release a package until Consul 0.7.0 came out since there's some fairly major API changes on the C# side but it might be worth just doing it because the APIs being dropped appear to be unused anyway.
from consuldotnet.
@highlyunavailable No chance of publishing this package as prerelease on NuGet? It would make life slightly easier in Nanophone, one of my own projects. :-)
from consuldotnet.
@lvermeulen Behold: https://www.nuget.org/packages/Consul/0.6.4.8-alpha1
Let me know if you run into any issues - tests pass but there can always be bugs after changes of this magnitude that the tests didn't catch. Also check out the CHANGELOG in the develop
branch, some major changes around configuration of the ConsulClient were made that I wanted to release as 0.7.0 but got into this version. They shouldn't break anything, but you might get compile warnings.
from consuldotnet.
@highlyunavailable Great, thanks!
from consuldotnet.
.NET Core support is live in the alpha versions (e.g. 0.6.4.8-alpha2) and later and is slated to be released in "stable" in with 0.7.0.
from consuldotnet.
Related Issues (20)
- Consul.ConsulRequestException: Unexpected response, status code InternalServerError: rpc error making call: EOF HOT 4
- No way to read ServiceMeta
- ConsulConfigurationException throw if URL scheme specified in CONSUL_HTTP_ADDR environment variable. HOT 1
- Latest version is not available in Nuget HOT 2
- Add Meta dictionary to AgentService and AgentServiceRegistration HOT 1
- Does not work on netcoreapp2.1 HOT 5
- Enable HttpClientHandler pooling? HOT 2
- KV Txn call may deadlock HOT 3
- Grpc heartbeat HOT 2
- Support for Consul Connect? HOT 1
- 0.9 Port Status
- No .Net Framework 4.0 compatibility HOT 1
- Filter Service and Health by multi tags
- I hope to support the heartbeat of grpc
- Agent.ServiceRegister hangs after KV.Get with new QueryOptions {WaitIndex = index}
- Aquire Lock custom KV value
- Service status
- Bad request : Invalid wait time and multiple Get request while trying to acquire leader HOT 2
- Cluster support
- Add consul.dll.xml into the NuGet package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consuldotnet.