Skip to content

Move elixir_sense to elixir-lsp and dialyxir to current.#10

Merged
axelson merged 2 commits into
masterfrom
change-deps
Jan 6, 2019
Merged

Move elixir_sense to elixir-lsp and dialyxir to current.#10
axelson merged 2 commits into
masterfrom
change-deps

Conversation

@asummers

@asummers asummers commented Jan 5, 2019

Copy link
Copy Markdown
Contributor

No description provided.

@axelson axelson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@axelson axelson merged commit 25a867d into master Jan 6, 2019
@axelson axelson deleted the change-deps branch January 6, 2019 00:01
lukaszsamson added a commit that referenced this pull request Jun 6, 2026
Replaces the earlier narrow engine patch with a faithful port of the whole
complete-merges completion refactor, reconciled against 1.20's elixir_sense
(b8362663, a 137-commit-newer descendant of complete-merges' f248030e) and
1.20's GenLSP completion.ex.

Engine (apps/elixir_ls_utils/lib/completion_engine.ex): taken from
complete-merges verbatim, then NormalizedCode.Fragment -> Code.Fragment
(the shim is gone; stdlib Code.Fragment covers it on 1.16+). Brings:
- alias_only/6 wired into the {:dot,...} case: alias/import/require and
  alias __MODULE__. complete to modules only (upstream b59907eb).
- NormalizedMacroEnv.expand_alias-based value_from_alias / simple_expand /
  expand_struct_module (replaces Source.concat_module_parts, which
  elixir_sense marks 'TODO remove').
- expand_struct_module cases for __aliases__, __MODULE__, module attributes,
  and match-context %var{} (incl. upstream #14308 __MODULE__-struct fix).
- container_context (map/struct field + bitstring modifier) via
  Code.Fragment.container_cursor_to_quoted; map-update simple_expand path.
- hint/exact-filtered get_module_funs/4 + get_metadata_module_funs/7
  (upstream 1.20 memory/filtering improvements #15140/#15143).
- default_args + needed_import(all-arities) output shape (replaces def_arity).
- {:block_keyword_or_binary_operator, _} (Elixir 1.18+) handled (returns
  empty; block keywords come from the LSP layer's maybe_add_do/keywords).

Reducers + suggestion.ex: complete_engine.ex passes full text_before to the
engine and routes struct_field/bitstring_option groups; record.ex and
type_specs.ex (variable-module expand, #10) taken from complete-merges;
struct.ex and bitstring.ex deleted (folded into the engine).

LSP completion.ex (kept on GenLSP): maybe_reject_derived_functions rewritten
to expand default-arg variants from default_args; :field clause reads
summary/metadata optionally so engine-sourced struct/map/record fields match.

Ecto query plugin: get_module_funs/4 call + pattern updated to the new
one-entry-per-macro tuple shape (complete-merges left this calling the
nonexistent 2-arg form).

Tests: complete_test.exs + suggestions_test.exs ported from complete-merges
and adapted for OTP28 (:group->:category, source_anno) and Elixir 1.20
(fn-empty-rhs warning removed, record metadata fields). completion_test.exs
kept on 1.20 GenLSP.

Full suite: elixir_ls_utils 142, language_server 1588 (1 skipped, 2 excluded),
debug_adapter 116 — 0 failures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants