Coder Social home page Coder Social logo

Comments (20)

spraints avatar spraints commented on June 16, 2024

This also happens if you git tfs help pull | less in git bash. Very annoying. A fix is most welcome.

from git-tfs.

JamesDunne avatar JamesDunne commented on June 16, 2024

Lol, love the subtle undertone of "please fix it for me". :)

As I mentioned it looks to be internal to CSharpOptParse. I did look into it a little bit but concluded that I'd have to hack that library to fix it. Did you know they use embedded XSLT templates as assembly resources in order to translate your UsageBuilder into text or HTML form? Shocking, and a little disgusting. If I find some time I'll look into it.

from git-tfs.

spraints avatar spraints commented on June 16, 2024

yeah, i was a little shocked and appalled at what i found in there when i went to figure out what was going on.

from git-tfs.

jedidja avatar jedidja commented on June 16, 2024

Running a normal command prompt, I also get a similar error:

C:\git>git-tfs help fetch 
Usage: git-tfs fetch [options] [tfs-remote-id]...
Function 'ext:FormatText()' has failed.
Attempt by method 'System.Xml.Xsl.XsltOld.XsltCompileContext+FuncExtension.Invoke(System.Xml.Xsl.XsltContext, System.Object[], System.Xml.XPath.XPathNavigator)'
to access method 'CommandLine.OptParse.UsageBuilder+TextTransformHelper.FormatText(System.String, Int32, Int32)' failed.

from git-tfs.

rbanks54 avatar rbanks54 commented on June 16, 2024

@jedidja change the "git-tfs" in your command to "git tfs", i.e. without the dash, and try again. git-tfs is a git plugin, not a command of it's own.

from git-tfs.

jedidja avatar jedidja commented on June 16, 2024

Oh -- oops :) I kept wondering why all the examples had 'git tfs' instead of 'git-tfs'. That still throws the same error though

Jedidja@SKYFIRE-PC /c/git
$ git tfs help fetch
Usage: git-tfs fetch [options] [tfs-remote-id]...
Function 'ext:FormatText()' has failed.
Attempt by method 'System.Xml.Xsl.XsltOld.XsltCompileContext+FuncExtension.Invoke(System.Xml.Xsl.XsltContext, System.Object[], System.Xml.XPath.XPathNavigator)'
 to access method 'CommandLine.OptParse.UsageBuilder+TextTransformHelper.FormatText(System.String, Int32, Int32)' failed.

from git-tfs.

nylen avatar nylen commented on June 16, 2024

I have had good luck with the NDesk options library - it's nice and simple:

http://www.ndesk.org/Options

from git-tfs.

spraints avatar spraints commented on June 16, 2024

Cool. That looks like a good replacement for the current option parser.

from git-tfs.

nulltoken avatar nulltoken commented on June 16, 2024

I have had good luck with the NDesk options library - it's nice and simple:

As stated by @migueldeicaza here, NDesk.Options is now distributed as part as Mono.

If the licencing is compatible, you may be willing to reuse the parser, which keeps on being maintained by the original author @jonpryor.

from git-tfs.

nylen avatar nylen commented on June 16, 2024

As far as I can tell, the licenses are compatible. The library is MIT-licensed, and from http://apache.org/legal/resolved.html#category-a:

Works under the following licenses may be included within Apache products:

  • [...]
  • MIT/X11
  • [...]

@nulltoken, the file you linked to is all there is to the library anyway.

from git-tfs.

nulltoken avatar nulltoken commented on June 16, 2024

@nulltoken, the file you linked to is all there into the library anyway.

@nylen Yes, indeed. However, NDesk.Options hasn't been updated in two years and is considered as Unstable by its author. Mono version of the code is kept up to date. I've checked and Mono.Options library looks like to be MIT licenced as well.

You can find the whole project here.

from git-tfs.

jonpryor avatar jonpryor commented on June 16, 2024

I don't consider NDesk.Options as Unstable. I just lost access to ndesk.org and can't connect back with Alp Toker to update the ndesk.org version. :-(

The only difference between the two, literally, is a #define. If you look at Options.cs, the NDESK_OPTIONS #define check on line 148 allows you to change the namespace (https://github.com/mono/mono/blob/2602f1367e4d1d9ae2207ed13040e3594dc40121/mcs/class/Mono.Options/Mono.Options/Options.cs#L148). That's the only difference between Mono.Options and NDesk.Options.

from git-tfs.

nulltoken avatar nulltoken commented on June 16, 2024

I don't consider NDesk.Options as Unstable.

@jonpryor Sorry for the misunderstanding. I wasn't trying to put words in your mouth. I was only refering to different minor things.

  • the web site stating The NDesk.Options.dll assembly is currently UNSTABLE..
  • the release note for version 0.2.1 which was posted on Oct, 20th 2008.
  • the latest commit at git.ndesk.org was somewhat old compared to the latest Mono version.

I just lost access to ndesk.org

Sorry to hear this. This explains that.

The only difference between the two, literally, is a #define.

Ok, but... the commit log in the Mono repository still show some activity since the latest published NDesk version. Or am I mistaken?

However thanks a lot for your amazing work with this lib!

from git-tfs.

jonpryor avatar jonpryor commented on June 16, 2024

There are different definitions of "stable." Above, I mean that it's "stable" as in "it has no known bugs, won't corrupt your app, and is usable."

Previously, I said that NDesk.Options/Mono.Options had an unstable API, meaning that I reserve (and still reserve) the right to make API incompatible changes if/when necessary.

I still want to consider the API to be unstable, though I don't intend on changing the API.

What does this mean, practically speaking? It means that you shouldn't strong-name Mono.Options.dll and install it into the GAC, and you should instead bundle either the source or the assembly with your app. That's all.

from git-tfs.

nulltoken avatar nulltoken commented on June 16, 2024

@jonpryor Thanks for this very clear explanation!

A very last point: Was I correct when I previously mentioned that the git.ndesk.org repository is no longer up-to-date and that when bundling the source, one should rather use the mono repository?

from git-tfs.

jonpryor avatar jonpryor commented on June 16, 2024

@nulltoken Yes, you're correct that the git.ndesk.org repository is no longer up to date. I'd update it if I could, but I've been unable to locate Alp so that I can update it...

from git-tfs.

nulltoken avatar nulltoken commented on June 16, 2024

@jonpryor Thanks for having taken the time to bare with me :) And for making the world a better place with your commitment to Mono.

from git-tfs.

spraints avatar spraints commented on June 16, 2024

I started swapping out option parsing over the weekend.

from git-tfs.

spraints avatar spraints commented on June 16, 2024

please re-open if this problem isn't resolved.

from git-tfs.

sc68cal avatar sc68cal commented on June 16, 2024

Looks good to me - awesome work @spraints

from git-tfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.