unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: Ingo Lohmar <i.lohmar@gmail.com>,
	jostein@kjonigsen.net, 23053@debbugs.gnu.org
Subject: bug#23053: 25.0.92; error in cc-mode when editing C# file with a generic class inheritance
Date: Sat, 19 Mar 2016 08:29:34 +0100	[thread overview]
Message-ID: <1458372574.1341144.553674538.3D65409A@webmail.messagingengine.com> (raw)
In-Reply-To: <87wpozbd0r.fsf@acer.localhost.com>

On Sat, Mar 19, 2016, at 12:08 AM, Ingo Lohmar wrote:
> 
> It is quite daring to call out an Emacs bug when you only encounter a
> problem in "random" 3rd-party code :)
> 
> I have used csharp-mode before --- unless something has dramatically
> changed in the last 3 months, it is essentially unmaintained.
> 
> Also, and I hope this does not sound too harsh, the csharp-mode code has
> its fair share of problems to begin with.  For example, it uses faces
> and cc-mode variables in ways that they are not intended for.
> Therefore, it is plagued by more or less subtle font-lock and
> indentation bugs.  It has severe performance problems.  It has not been
> updated to deal w/ recent C# additions.  It is also fairly bloated,
> adding "features" only remotely related to editing C# code.
> 
> About a year ago, I started to strip down the code to the bare
> essentials and tried to make it more robust and play nicely with the
> cc-mode machinery.  While this worked.. hmmm.. ok for the most part, I
> have hesitated to put any of that code out in the open, as some of the
> above problems remain unsolved.  My take-away was that cc-mode is a big
> and complex beast as it stands, and I am not too eager to dive into all
> its details.  If nobody else is doing the dirty work, chances to
> properly support C# in **this** framework are pretty slim, I guess.
> 
> My hope is that the open-sourced Roslyn framework that is now used in
> Omnisharp (haven't tested it) could also be used to do the whole
> font-lock/indentation thing, such that we would not have to try to fit
> C# into the cc-mode shape.

Just to ensure all cards ar on the table... Hi. I'm the guy who kinda
involuntarily has been maintaining csharp-mode for a couple of years
now :)

(self-defensive-mode t)

Basically Dino Chiesa left csharp-mode unmaintained on Google Code, with
issues unaddressed and breaking bugs unfixed and no work invested after
2011.

In 2014, After Emacs 24 broke it, I forked the repo, moved it to Github
and took over ownership. Since then 42 issues have in some way been
addressed or closed, most of them fixed.

Rather than add features which I can't complete or support, the focus
was on ensuring that the core language-mode code works, and if you want
IDE like features, you just supplement it with Omnisharp.

Basically its in bug-fix mode, which by no means should be taken as
"unmaintained" :)

With all that said, I don't think you are being overly harsh. The code
does have obvious issue here and there and maybe even everywhere, but I
don't think it's as bad as you paint it out to be.

The only performance-problem I am aware of is with the imenu-indexing,
and that's only for extremely big files not adhering to C# conventions
of one class per file. This is also code which can be disabled and
replaced with a (much better) Omnisharp-based alternative.

All in all its works reasonably well. Especially for being maintained by
someone not particularly well versed in Emacs lisp :)

(self-defensive-mode 0)

So if you feel like there are issues which should be addressed, please
feel free to raise them on the Github issue tracker:

https://github.com/josteink/csharp-mode/issues

I can't address or fix things I'm not aware of needing fixing. :)

I'm all for constructive suggestions to make the code a little less
horrible (and you seem to have a few). Please post them!

If you've tried to do any work or improvements with csharp-mode, I would
love to see what changes you propose. It's not really "my" code, I'm
just trying to keep it in working order, and I have no qualms over
throwing big chunks out :)

As for more closely aligning the goals of Omnisharp and csharp-mode, I
don't think that is such a far fetched idea. It has been proposed in the
past, but the Omnisharp-guys has (so far) preferred to have csharp-mode
be its own beast, which they supplement, rather than doing a full merge
(and thus taking on core language-mode responsibilities).

Now with all that said... And back to the bug. *phew*

This particular code which is now breaking has worked reasonably well
since Emacs 22 without any changes as far as I know.

*If* anyone says this bug is best fixed in csharp-mode, I'm not going to
argue a helluva lot over that, but I would appreciate some leads on how
to avoid tripping up cc-mode after recent changes in git master, while
remaining compatible with older Emacs-versions out there.

So to move the issue forward I guess we need to decide: Are we blaming
cc-mode or csharp-mode?

Anyone with strong opinions on the matter?

-- 
Jostein Kjønigsen
jostein@kjonigsen.net / jostein@secure.kjonigsen.net





  reply	other threads:[~2016-03-19  7:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18  9:07 bug#23053: 25.0.92; error in cc-mode when editing C# file with a generic class inheritance Saulius Menkevičius
2016-03-18 21:13 ` bug#23053: followup on 23053 Saulius Menkevičius
2016-03-18 21:33 ` bug#23053: 25.0.92; error in cc-mode when editing C# file with a generic class inheritance Jostein Kjønigsen
2016-03-18 23:08   ` Ingo Lohmar
2016-03-19  7:29     ` Jostein Kjønigsen [this message]
2016-03-19  8:27       ` Jostein Kjønigsen
2016-03-21 12:26         ` Alan Mackenzie
2016-03-21 12:45           ` Jostein Kjønigsen
2016-03-21 21:53             ` Saulius Menkevičius
2016-03-22 10:21               ` Jostein Kjønigsen
2016-03-25 18:54             ` Alan Mackenzie
2016-03-26  7:26               ` Jostein Kjønigsen
2016-03-26 10:48                 ` Alan Mackenzie
2016-03-19 10:05       ` Ingo Lohmar
2016-03-19 15:00         ` jostein
2016-03-19 17:54           ` Jostein Kjønigsen
2016-03-20 20:57             ` Jostein Kjønigsen
     [not found] ` <mailman.7741.1458315553.843.bug-gnu-emacs@gnu.org>
2016-03-19 13:14   ` Alan Mackenzie
2016-03-19 14:15 ` Saulius Menkevičius
2016-03-20 21:16   ` Alan Mackenzie
2016-03-21 21:51     ` Saulius Menkevičius
2016-03-26 10:55       ` Alan Mackenzie
2016-03-26 10:59       ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458372574.1341144.553674538.3D65409A@webmail.messagingengine.com \
    --to=jostein@secure.kjonigsen.net \
    --cc=23053@debbugs.gnu.org \
    --cc=i.lohmar@gmail.com \
    --cc=jostein@kjonigsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).