git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] userdiff: add builtin diff driver for TypeScript language

From
Matthew Hughes <matthewhughes934@gmail.com>
Date
Jul 16, 2024, 19:33 UTC
Message-ID
<20240716193344.bjb62zsfnrfw3ngf@archP14s>
In-Reply-To
<xmqq5xt5bat7.fsf@gitster.g>
Oe Tue, Jul 16, 2024 at 08:45:08AM -0700, Junio C Hamano wrote:
> What does it mean?
> 
> The patterns that were posted were so broken that they are unusable
> and harm the users by giving misleading information?

I think this would be a good summary. It's sufficient for some simpler cases considered, and does even give some benefits e.g. for function headers for nested functions. However, the cases where it fails can be significant, e.g. hundreds of lines away from the correct function header for files with multiple consecutive multi-line arrow functions.

> In the latter case, how far from the ideal are the decisions done by
> the current patterns, and what's the rough percentage of usual code
> we see in the real world, for which the current patterns do not work
> well?

I think just the missing `export` keyword handling would be equivalent to missing all public functions in other programming languages, so that alone would be a decent percentage.

Show 6 quoted lines
> What I am trying to gauge is if it is so broken that it should not
> exist (in other words, you regret sending the patch to the list
> before doing these updates), or is "already serviceable, but not
> perfect yet".  Waiting for perfection takes forever.  If the latter,
> letting the general public to use it to gather feedbacks by waiting
> for the dust to settle before making such updates is often better.

I'm leaning towards the former case: that this patch was premature. I think it's far enough from perfect that it would greatly benefit from me more actively reaching out to the TypeScript language team and asking some devs there try out the changes and gather some more input (and identify some more missing cases, of which I now expect that are many) before getting something out to general users.

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 6 in “userdiff: add builtin diff driver for TypeScript language”
  1. userdiff: add builtin diff driver for TypeScript languageMatthew Hughes via GitGitGadget, Jul 15, 2024
  2. Matthew HughesJul 16, 2024
  3. Junio C HamanoJul 16, 2024
  4. Matthew HughesJul 16, 2024
  5. Junio C HamanoJul 16, 2024
  6. Johannes SixtJul 16, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.