Compile Errors Galore - Cannot build some ServiceStack solutions download from GitHub - servicestack

This is just odd.
I'm getting a build error in ServiceStack.Text after just bringing down the latest build from GitHub.
if (endpointUrl.IsNullOrEmpty() || !endpointUrl.StartsWith("http"))
return null;
Error 1 No overload for method 'IsNullOrEmpty' takes 0 arguments
ServiceStack\src\ServiceStack.Common\Messaging\ClientFactory.cs 10 18
ServiceStack.Common
I'm also getting bunch of other build errors:
Error 35 'int' does not contain a definition for 'Times' and no extension method 'Times' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?) ServiceStack.Redis\src\ServiceStack.Redis\Messaging\RedisMqServer.cs 192 37 ServiceStack.Redis
and after downloading the ServiceStack branch, I even tried opening ServiceStack-master\src\ServiceStack.sln and tried to build and it's totally broken:
I don't know what's going on here, there can't possibly be this many build errors if any right? I pray not but it seems as such.
Purpose of this post, what I'm asking about and need help clarifying and resolving (mythz???)
I need input from ServiceStack here on the following:
1) are the builds really this broken? Am I imagining this?
2) The branch stucture on GitHub is all over the place meaning I'm finding dup project folders all over and I do not know what this ServiceStack branch is as in it's src folder has a ton of projects there, different versions, as well as doesn't have projects like ServiceStack.Text, etc. so I don't know what's going on here. I want to use the basic core of service stack but there's like repeated stuff everywhere overall on GitHub. I need ServiceStack to clear all this up for me.
Here is my code, so you can see for yourself, it doesn't build.
This one won't build in terms of the ServiceStack projects - it's my solution in which I'm simply trying to include the ServiceStack projects I need along with my own projects that are using ServiceSTack. All I did was downoad those individual projects from https://github.com/ServiceStack then added them to my solution and made sure that any references to each other were now Project references, no longer binary..I removed the binary refs and readded them as project refs. So for example ServiceStack.Common depends on ServiceStack.Text but it was referencing it via binary so I removed it and readded the reference to ServiceStack.Text as a project ref now because in the end we plan on being able to look at and work with the base Stack code. The errors I posted above are happening in this Solution for ServiceStack related projects.
This one won't build - it's a download of the ServiceStack branch master (originally folder name is ServiceStack-master, I removed the -master)
UPDATE: yes I confirmed it's a bad build checked in on the GitHub site (refering to the ServiceStack branch master right above here). I had to remove unused using statements that were causing the build to fail and one of these was a dup using statement causing part of the build failure. I am surprised at this...this stuff should build and people should be checking in code that BUILDS successfully! common! Yes mythz, any dev trying to consume your API would be pissed that there are so many build erros all the time, I can't even get our protype going because this is not the only solution that won't build. First we had the Examples solution all breaking and now the core. I'm willing to fix these if I can but I honestly can't believe it's been a mountain to try to even use this API because of these checked in builds that are failing.
This one Will build because it was Nuget down, so ServiceStack is referencing other layers via binary references in the lib folder so this builds...probably builds here because someone has a working set of builds across all core projects but the stuff on the site for download is not the same revision and broken when you try to use them as project references (source code)?? Just my conclusion as it's only building IF you are using binary references to the lib folder. We want the source, not the binaries to work inside our solution so this is a brick wall for me

There are a lot of big changes happening on master right now - it will be unstable for a while.
I suggest you branch from the v3-fixes tag or pull the references from nuget.

#CoffeeAddict
Yesterday, the mythz answered about these problems in your previous question
"#CoffeeAddict like I said before, ServiceStack's is undergoing significant re-factoring and master in alpha and not for public use. While everything still builds for me and tests still pass in CI, it will be frequently unstable until its in beta. You're likely mixing v3 with v4 dlls which are technically incompatible. The release on NuGet is off the v3 branches of each project, that's what you should checkout if you want to build from src. Any contribs should be done to v3-fixes only - see Contributing docs for more info. – mythz 9 hours ago"

well looks like when I had downloaded all the stack branches, at the time earlier today contributors had checked in broken builds. Fabulous.
I just got latest early this morning, and appears people must have fixed the build and checked some stuff back in for various core projects. Now it builds.
Suggestion to mythz, get CI in place NOW. Don't wait for v4. This cost me a freakin day of trying various things to get this stuff to build and the problems were across several projects. This shouldn't happen, setup CI please. It's 2am and nobody using this project should have to deal with it.
I will contribute but first I had to get a full build to work! Not too happy as no dev would be wasting an entire day getting ServiceStack to build.

To compile v3:
Would someone with true knowledge post PROPER instructions on compiling v4 or v3? I had no luck with the build.bat files for v3 or v4, and opening solutions will not compile for most.
git clone servicestack, servicestack.text, redis, ormlite
make a new directory and copy from under src so you have these:
ServiceStack
ServiceStack.Client
ServiceStack.Common
ServiceStack.Interfaces
ServiceStack.OrmLite
ServiceStack.Redis
ServiceStack.Server
ServiceStack.Text
open csproj for ServiceStack.Interfaces ... right click properties, go to the signing tab, click the combo, new, type in your own signing pfx, I used servicestackInterfaces.pfx (doesn't matter) and make up a password.
Compiles fine, since it has not much referenced.
saved solution as ServiceStackV3 in folder C:\2015\SSv3compile
add csproj ServiceStack.Text, set signature, compiles ok
add csproj ServiceStack.Common, set signature, remove references, add references using solution for interface, text, compiles ok
add csproj ServiceStack.Client, set signature, remove references, add references using solution for interface, text, compiles ok
add csproj ServiceStack, set signature, remove references, add references using solution for client, common, interface, text, compiles ok
add csproj ServiceStack.OrmLite, set signature, remove references, add references using solution for common, interface, text, compiles ok
add csproj ServiceStack.Redis, set signature, remove references, add references using solution for common, interface, text, compiles ok
add csproj ServiceStack.ServiceStack.Server, set signature, remove references, add references using solution for Servicestack, ServiceStack.Client, ServiceStack.Common, ServiceStack.Interface, ServiceStack.Text, ServiceStack.Ormlite, ServiceStack.Redis
compiles ok
have some more trouble compiling the tests...
and finding so many tweaks and changes which are for me maddening to find
(endless agentransack searching for "namespace ISomethinMissing" in *.cs
... there seems to be namespace ServiceStack with cs code contained in projects other than Servicestack...
isn't that VERY improper? (now you require both DLLs? why not one?)
whatever...its free and works for what I wanted.
looks like there is some code leakage from v4...
after getting my head around v3, not sure I want to buy v4 - I will probably buy it in the future, I expect, and hope someday I can just clone and compile from the solution
ANyway, I love servicestack and have been
replacing old webservices
and the config nightmares of WCF with great happiness...
I say it is well worth the initial hassle.
I put this all in code block because I found the editor wouldn't accept this simple text when it was in a numbered list. whatever.

Related

Xcode warning: _startToken(startToken) will be initialized after _deleteConfigs(deleteConfigs)

I just upgraded to the C++ 4.7.2 runtime source and when I build in Xcode, I get the warning
_startToken(startToken) will be initialized after _deleteConfigs(deleteConfigs)
This is in the second constructor of NoViableAltException.
Obviously I can fix this locally (warnings are considered errors in my environment) but this should probably be propagated back into the source tree. I've no idea who does that.
You usually fork ANTLR4 on Github, make your changes and create a pull request from that. You need to have a Github account for that.
However in such a simple case I can probably do the change(s), just give me a patch.

GitVersion – selective versioning multiple assemblies of the same project

I’m on a .net c# project composed by a solution with several class library projects.
The source control is managed by git using gitflow as branching model.
We have decided that we wanted to implement semantic versioning (http://semver.org/) of the project in order to follow a standard way to communicate our releases.
For that we are using GitVersionTask (via NuGet) which works pretty well with gitflow.
Every time we tag a release and we perform a build from the master branch the version of all assemblies are updated and a new release is out for delivery.
Only one of the assemblies has a public API, all the other are for internal consume. I would like to know if this is the correct way to manage the version of multiple assemblies of the same project I mean, isn’t it wrong to change the version of every assembly when only a couple (or even just one) was changed? To get thinks more complicated there is strong possibility that some of the “internal” assemblies will be used by other projects so I believe it not very wise to increment a major version of an assembly that didn’t suffer a change just because another assembly of the same project is promoting breaking changes. Should each assembly project be managed on its own repository?
Thanks in advance.
I know this is a bit of an old question, still:
I want to share a workaround that seems to be working:
GitVersion uses $(Build.SourcesDirectory) to see where the sources are located - src
We can change this using logging commands*
Workaround is to set the Build.SourcesDirectory before GitVersion task
Then gitVersion uses the GitVersion.yml from the project folder (Build.SourceDirectory) and voila - works
After that you might want to roll back the change or not - depending on your need. For me it seems it is nice to scope down to the only nuget package from the collection of nuget packages in our nugetPackages monorepo.
see GitVersion issue and comment
*Example Powershell command:
standard PowerShell task; set to inline script;
Write-Host "##vso[task.setvariable variable=Build_SourcesDirectory;]$(Build.SourcesDirectory)\$(NugetProjectName)"
There is certainly nothing in GitVersion that would help with having separate projects within the same repository. The guidance that we would offer here is that you should use different repositories for the different parts of your application. That way they can be versioned/updated at their own cadence.

Does the case for not including Node modules in version control also apply to Composer packages?

In doing research on whether Node's node_modules should be checked into your version control repository, the most recent consensus seems to be that you should include it for applications you deploy.
Sources:
Check in node_modules vs. shrinkwrap
Should I check in node_modules to git when creating a node.js app on Heroku?
https://www.npmjs.org/doc/misc/npm-faq.html#Should-I-check-my-node_modules-folder-into-git
In reading these arguments, it lead me to question whether Composer's /vendors directory should also be checked into version control. Composer's documentation suggests that you don't:
Should I commit the dependencies in my vendor directory?
The general recommendation is no. The vendor directory [...] should be added to .gitignore/svn:ignore/etc.
The best practice is to then have all the developers use Composer to install the dependencies. Similarly, the build server, CI, deployment tools etc should be adapted to run Composer as part of their project bootstrapping.
While it can be tempting to commit it in some environment, it leads to a few problems:
Large VCS repository size and diffs when you update code.
Duplication of the history of all your dependencies in your own VCS.
[...]
Contrasting that argument is this one (source):
Doesn’t checking in node_modules create a lot of noise in the source tree that isn’t related to my app?
No, you’re wrong, this code is used by your app, it’s part of your app, pretending it’s not will get you in to trouble. You depend on other people’s code and they are just as likely to write new bugs as you are, probably more so. Checking all of that code in to source control gives you a way to audit every line that ever changed in your application. It allows you to use $ git bisect locally and be ensured that it’s the same as in production and that every machine in production is identical. No more tracking down unknown changes in dependencies, all the changes, in every line, are viewable in source control.
In summary, the question is this: Why would one gitignore (i.e. not version control) node_modules but not do the same for Composer's vendor/ directory?
The reason to commit external dependencies is
it's easier to deploy with git pull
the code used is directly included in the commit anyone checks out
Arguments against this are
Git is no deployment tool
all dependency managers do have a way to make exactly sure the code used can be fetched
I don't know anything about npm, but for Composer that last point is implemented by committing composer.lock.
I don't think the "audit code" argument is a valid one in every case. If you do write software that get's audited by itself, and subsequently needs all libraries to be audited, then probably all code changes need to be conserved. This isn't true for the general case.
git bisect works still as well with a committed composer.lock. It does require installing the dependencies with every bisect step, but this is just one simple step, probably already done in the automatic test suite run.
The last thing to worry about is when used packages go offline. This really is more of a problem with Composer, because there is no central hosting of the downloadable releases (npm probably does this). If this is a problem, either commit the code (and try to figure out how to update that missing package in the future), or setup an instance of Satis to create a local copy of the code you use.
Putting all your modules in you VCS makes it really heavy to download or upload. For example, I work on two node.js projects and the total node_modules directories size is between 250MB and 500MB whereas the whole code with assets is generally less than 40MB. Every Node.js developer likes Node lightness, so the code must stay easy to download and share.
For the second point, an alternative to avoid regressions is to be more restrictive in your package.json dependencies versions. You will find more information here.
Finally the best argument is to take a look on the famous modules everybody know :
express ignores
node_modules
mocha ignores
node_modules
q ignores node_modules
...
The more I research this the more I'm starting to think that there is no one correct answer to this, just different opinions as well as pros and cons of each method.
This blog, looking from the context of Bower, does a good job of weighing the pros and cons of each: http://addyosmani.com/blog/checking-in-front-end-dependencies/.
In short: At least for right now, weigh the pros and cons and decide what best fits your situation.

Where's the NodaTime.Serialization.JsonNet?

At Latest API documentation NodaTime.Serialization.JsonNet is shown as a part of NodaTime library.
But I can't find it anywhere. Here's the NodeTime in ObjectBrowser in my VisualStudio.
I even looked into NodeTime.Testing and haven't found it.
I don't know where to look for it anymore. These two (NodeTime and NodeTime.Testing) are only packages available over NuGet.
From the page you linked to:
Code in this namespace is not currently included in Noda Time NuGet packages; it is still deemed "experimental". To use these serializers, please download and build the Noda Time source code from the project home page.
For 1.2, we'll be distributing a separate pre-built assembly and NuGet package, but that's not quite ready yet, so for now you'll have to build your own.

Project references v NuGet dependencies

I am in the process of introducing NuGet into our software dev process, both for external binaries (eg Moq, NUnit) and for internal library projects containing shared functionality.
TeamCity is producing NuGet packages from our internal library projects, and publishing them to a local repository. My modified solution files use the local repository for accessing the NuGet packages.
Consider the following source code solutions:
Company.Interfaces.sln builds Company.Interfaces.1.2.3.7654.nupkg.
Company.Common.sln contains a reference to Company.Interfaces via its NuGet package, and builds Company.Common.1.1.1.7655.nupkg, with Company.Interfaces.1.2.3.7654 included as a dependency.
The Company.DataAccess.sln uses the Company.Common nupkg to add
Company.Interfaces and Company.Common as references. It builds
Company.DataAccess.1.0.8.7660.nupkg, including Company.Common.1.1.1.7655 as a dependent component.
Company.Product.A is a website solution that contains references to all three library projects (added by selecting the
Company.DataAccess NuGet package).
Questions:
If there is a source code change to Company.Interfaces, do I always need to renumber and rebuild the intermediate packages (Company.Common and Company.DataAccess) and update the packages in Company.Product.A?
Or does that depend on whether the source code change was
a bug fix, or
a new feature, or
a breaking change?
In reality, I have 8 levels of dependent library packages. Is there tooling support for updating an entire tree of packages, should that be necessary?
I know about Semantic Versioning.
We are using VS2012, C#4.0, TeamCity 7.1.5.
It is a good idea to update everything on each check-in, in order to test it early.
What you're describing can be easily managed using artifact dependencies (http://confluence.jetbrains.com/display/TCD7/Artifact+Dependencies) and "Finish Build" build triggers (or even solely "Nuget Dependency Trigger").
We wrote our own build configuration on the base project (would be Company.Interfaces.sln in this case) which builds and updates the whole tree in one go. It checks in updated packages.config files and .nuspec files along the way. I can't say how much of a time-saver this ended up being for us, even if it might sound like overkill at the beginning.
One thing to watch out for: the script we wrote checks in the files even if the chain fails somewhere in between, to give us the chance of fixing it on our local machine, check in the fix and restart the publishing.

Resources