Page MenuHomePhabricator

Ctrl-click symbol lookup language in Diffusion ignores `syntax.filemap`
Open, Needs TriagePublic

Description

The ctrl-click symbol lookup in Diffusion is more limited than Differential: you get no results when ctrl-clicking symbols in C++ header files in Diffusion, as it's hardcoded to use the file's extension in the lookup query.

Steps to repro

  1. Add a {"(\\.h$)": "cpp"} rule to syntax.filemap, in an attempt to make Phabricator treat .h files as .cpp files.
  2. Index your C++ repository via ctags using the shipped Phabricator scripts
  3. Ctrl-click the same symbol in a C++ header file (.h extension) in both Diffusion and Differential.

In Diffusion, you get no results for the symbol query when browsing a C++ header file, because it's using "h", rather than "cpp" as the language. In Differential, it uses syntax.filemap to normalise the language to "cpp", and so will give you the expected results.

phabricator 1558175ec84c7b13ba3f692b897464901bc00578 (Sat, Jun 11)
arcanist 7b0aac5c6f31c1374075b4eab20ecb9107e3cabd (Sat, Jun 11)
phutil ad458fb7df5920d012d4a982aef7c9e0f2020128 (Sat, Jun 11)

Event Timeline

avivey renamed this task from Ctrl-click symbol lookup language is inconsistent between Diffusion and Differential to Ctrl-click symbol lookup language in Diffusion ignores `syntax.filemap`.Jun 12 2016, 6:33 PM
avivey added a project: Symbols.