ack3 icon indicating copy to clipboard operation
ack3 copied to clipboard

Add GN (Generate Ninja) filetype

Open thiagowfx opened this issue 3 years ago • 3 comments

https://github.com/beyondgrep/ack3/blob/dev/CONTRIBUTING.md:

  • The name of the filetype: GN (Generate Ninja) What the definition of the filetype would be, taken from the .ackrc file that you've been using: .gn, .gni
  • URL of a web page that discusses what the filetype is: https://gn.googlesource.com/gn/
  • What the file contains, and why it should be a filetype: GN is a meta-build system that generates build files for Ninja.
  • How widely used this filetype will be: It's widely used in Chromium and it's very similar to https://bazel.build/.

Patch: https://github.com/thiagowfx/ack3/commit/7aabc0ac3bcda3a2c1192cffd337f3f33cd361f3

I didn't submit a PR to this repo because of the instructions in CONTRIBUTING.md requested to file an issue first.

thiagowfx avatar Dec 22 '22 19:12 thiagowfx

So it sounds like this roughly analogous to a Makefile, right?

How long have you been using it? Are you typically searching for something in them, or excluding GN files?

petdance avatar Dec 22 '22 21:12 petdance

Also: It makes me happy to see folks reading the docs. :-)

petdance avatar Dec 22 '22 21:12 petdance

So it sounds like this roughly analogous to a Makefile, right?

It's a bit more complicated than that, as the files are often composed together. If you were to compare it with a Makefile, I'd say it's similar to cmake / CMakeLists.txt in the sense that in a single project you tend to find many of them scattered around the codebase.

How long have you been using it?

Since early August, apparently! https://github.com/thiagowfx/.dotfiles/commit/dcc256887605bc39913ddeaec80be0599cf9af9f

Are you typically searching for something in them, or excluding GN files?

Typically searching for something in them, like a buildflag or a variable. Something like: ack --gn is_chrome_for_testing or ack --gn executable\( or ack --gn browser_tests.

thiagowfx avatar Dec 25 '22 14:12 thiagowfx