profile
viewpoint
Aleksey Kladov matklad @ferrous-systems Berlin https://matklad.github.io/ rosalind.info, Stepik.org, IntelliJ Rust, rust-analyzer. Stuck writing parsers.

intellij-rust/intellij-rust 2845

Rust plugin for the IntelliJ Platform: https://intellij-rust.github.io/

ferrous-systems/cargo-review-deps 44

A tool for auditing Cargo dependencies during updates

fitzgen/id-arena 37

A simple, id-based arena

async-rs/a-chat 32

A simple chat implemented on top of async-std

eugenyk/hpcourse 11

Repository to store student's practical works on high performance computing course

effect/bii-14s 1

Bioinformatics Institute, 2014, Spring

lambda-llama/icfpc2016 1

λ-llama code for ICFP contest 2016

pull request commentrust-analyzer/rust-analyzer

Enable SemanticTokens on the client

I think we can just hide this behind a config setting. I am more worried that it's impossible to publish an extension with proposed API....

kjeremy

comment created time in 6 minutes

push eventrust-analyzer/rust-analyzer

matklad

commit sha 8154bdf7aa3cf277582706b883634979113e383f

Automated deployment: Wed Feb 26 13:45:48 UTC 2020 2dee0779e9977e4570122c42ac35c4183bb8e604

view details

push time in 11 minutes

pull request commentrust-analyzer/rust-analyzer

Server-side Semantic Tokens

Also, I think there was a problem that requests are canceld with ContentModifed, but are not retried by the client.. Am i remmebering this correctly? Have we reported an upstream issue?

kjeremy

comment created time in 12 minutes

push eventrust-analyzer/rust-analyzer

Edwin Cheng

commit sha ffdc740446585502bd179cb608a033dd74a41e39

Add recursive support in original_range

view details

Edwin Cheng

commit sha 871dc2bd3cec11f76a4ef93ac3438af80fb6e776

Remove duplicate comment

view details

Aleksey Kladov

commit sha 2dee0779e9977e4570122c42ac35c4183bb8e604

Merge pull request #3314 from edwin0cheng/original-range-recursive Add recursive macro support in `original_range`

view details

push time in 14 minutes

PR merged rust-analyzer/rust-analyzer

Add recursive macro support in `original_range`

Related: #3135 and #3000

This PR should fix above issues (I tested), but let them open and ask for feedback if I missed something here.

PS: #3222 will move original_range to new Semantics API and thus this PR must be conflict with that. So please don't merge this now, I would rebase after that PR is merged.

+57 -14

3 comments

2 changed files

edwin0cheng

pr closed time in 14 minutes

pull request commentrust-analyzer/rust-analyzer

Add recursive macro support in `original_range`

Bad day for bors today :(

edwin0cheng

comment created time in 14 minutes

pull request commentrust-analyzer/rust-analyzer

Add recursive macro support in `original_range`

bors r+

edwin0cheng

comment created time in 14 minutes

pull request commentrust-analyzer/rust-analyzer

Server-side Semantic Tokens

It's still useful to have at least a PR

kjeremy

comment created time in 18 minutes

push eventrust-analyzer/rust-analyzer

matklad

commit sha 28c25537cf891d2016d5113b563976c5013ad4fc

Automated deployment: Wed Feb 26 13:36:58 UTC 2020 9b11c183ed41676bce00e8550707b6552184f30b

view details

push time in 20 minutes

delete branch matklad/rust-analyzer

delete branch : no-dep

delete time in 22 minutes

push eventrust-analyzer/rust-analyzer

Aleksey Kladov

commit sha 1f1bda2c5a1d897b39df7a936e14c31e74e1dfff

Remove unnecessary dep

view details

Aleksey Kladov

commit sha 9b11c183ed41676bce00e8550707b6552184f30b

Merge pull request #3320 from matklad/no-dep Remove unnecessary dep

view details

push time in 22 minutes

PR merged rust-analyzer/rust-analyzer

Remove unnecessary dep

bors r+ 🤖

+8 -26

0 comment

3 changed files

matklad

pr closed time in 22 minutes

create barnchmatklad/rust-analyzer

branch : no-dep

created branch time in 23 minutes

PR opened rust-analyzer/rust-analyzer

Remove unnecessary dep

bors r+ 🤖

+8 -26

0 comment

3 changed files

pr created time in 23 minutes

pull request commentrust-analyzer/rust-analyzer

Server-side Semantic Tokens

Oh, right... @kjeremy do you have client-side implemenation around by any chance? If you have, could you send a PR?

kjeremy

comment created time in 40 minutes

pull request commentrust-analyzer/rust-analyzer

Server-side Semantic Tokens

@kjeremy should I do anything else to test this besides code-insiders --enable-proposed-api matklad.rust-analyzer .? Doesn't work for me so far, probably I am doing something stupid like using an old version of extension or what not, but I can't find the problem immediately

kjeremy

comment created time in an hour

push eventmatklad/config

Aleksey Kladov

commit sha e8fc538d245bcdc814650966dab9297434833c0d

Update code-insiders

view details

push time in an hour

push eventrust-analyzer/rust-analyzer

matklad

commit sha 98cdb8c1381707c7f03f90bf4eca69aa0f30d175

Automated deployment: Wed Feb 26 12:30:38 UTC 2020 80f8e474a0c6a1cf477afc2141f9d6182f8b05a3

view details

push time in an hour

push eventrust-analyzer/rust-analyzer

Aleksey Kladov

commit sha 09bc7ca74dc920a01db32b2a29f70eb9f10c9853

Reduce visibility

view details

Aleksey Kladov

commit sha ade0176c20f7e4159a0cb81ae8034acacc915310

Remove dead code

view details

Aleksey Kladov

commit sha 80f8e474a0c6a1cf477afc2141f9d6182f8b05a3

Merge pull request #3318 from matklad/cleanup Reduce visibility

view details

push time in an hour

delete branch matklad/rust-analyzer

delete branch : cleanup

delete time in an hour

PR merged rust-analyzer/rust-analyzer

Reduce visibility

bors r+ 🤖

+90 -101

0 comment

5 changed files

matklad

pr closed time in an hour

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha ade0176c20f7e4159a0cb81ae8034acacc915310

Remove dead code

view details

push time in an hour

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 16a2e0c1c49920814a06302cbb203190516d14ce

Remove dead code

view details

push time in 2 hours

push eventmatklad/rust-analyzer

Kevin DeLorey

commit sha e3cda83f90a5e64ccf288438466e6c447df253a8

Added basic support for completing `fn` for trait impl.

view details

Kevin DeLorey

commit sha bc1fc6239d67708112f4f3997b104934dd11b7fd

Renamed the trait completion mod.

view details

Kevin DeLorey

commit sha 698ff91c1309b189ca0f08e3d62d219305ae5f46

Already implemented fn will no longer be suggested for trait implementations.

view details

bors[bot]

commit sha dc713ea21b2d5a4f02735a7f6aca21c1054e4ca6

Merge #2960 2960: Small cleanup r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>

view details

Florian Diebold

commit sha ba45c60611f0f41b3138c11b6059bb68b7c9743d

Fix env in emacs runnables support

view details

Laurențiu Nicola

commit sha d4d72e8b9b3cc8b9ce72444a11e16cfa606a7f59

Improve responsiveness of the cargo check status label

view details

Laurențiu Nicola

commit sha 0829e26354d10afcbe3182549169998811e3fe5e

Fix extra parentheses warnings

view details

Laurențiu Nicola

commit sha f83154d4bfa3e82a9b8a2ed0c4904820be829c90

Disable optimizations for some build-time crates

view details

bors[bot]

commit sha 12ac379c6c47be389499aa4b37c754cc478945cd

Merge #2966 2966: Fix extra parentheses warnings r=kjeremy a=lnicola Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>

view details

Laurențiu Nicola

commit sha 0fdca457df6baae3821fb026a1c0a85bca6642d7

Improve auto import message

view details

Florian Diebold

commit sha 2586cf9279c73b149f012228ce05b44410d66295

Implement support for selectAndApplySourceChange (auto import) in Emacs

view details

bors[bot]

commit sha fc0a8c14dcc6404c5d2ebb76488d6ebd894926c8

Merge #2965 2965: Improve auto import message r=kiljacken a=lnicola Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>

view details

bjorn3

commit sha f4431d2acc8e5dd25ed41c0c8af97050a7a230d1

[VSCode] Fix syntax highlighting Fixes #2969

view details

bjorn3

commit sha 5c39311f9639543fe1dd2a67ec5aff757bb830eb

Fix seedrandom in packaged extension Fixes #2971

view details

bjorn3

commit sha c84897bfb76b833122ee418d26e9bc53b4245ce8

Tsfmt

view details

bors[bot]

commit sha 8e0ad99832dec632621b09f626552a88506e43b0

Merge #2970 2970: [VSCode] Fix syntax highlighting r=matklad a=bjorn3 Fixes #2969 Fixes #2971 Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>

view details

bors[bot]

commit sha a878f39b5eea8876ee6238eca9b935cc32656862

Merge #2963 #2967 2963: Emacs fixes r=matklad a=flodiebold - use provided environment for runnables (finally set `RUST_BACKTRACE`) - implement `selectAndApplySourceChange` so auto-import works :slightly_smiling_face: cc @brotzeit 2967: Disable optimizations for some build-time crates r=matklad a=lnicola This speeds up a release build on my laptop from 4m 13s to 3m 33s. It's a bit disappointing, but we don't get perfect parallelism during the build. The non-RA dependencies finish building around 72s as opposed to 112s. Co-authored-by: Florian Diebold <flodiebold@gmail.com> Co-authored-by: Florian Diebold <florian.diebold@freiheit.com> Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>

view details

Aleksey Kladov

commit sha 5559d6b8a88750a78d91ff9c6cc1a1a736d22042

Prevent child cargo process from messing with our stdin By default, `spawn` inherits stderr/stdout/stderr of the parent process, and so, if child, for example does fcntl(O_NONBLOCK), weird stuff happens to us. Closes https://github.com/rust-analyzer/lsp-server/pull/10

view details

bors[bot]

commit sha eba599d9863553d0f7d9d93f4c9050943da171cc

Merge #2972 2972: Prevent child cargo process from messing with our stdin r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>

view details

bors[bot]

commit sha 3f499489f79d05f8cc31b72055155e91bc78fddc

Merge #2964 2964: Improve responsiveness of the cargo check status label r=matklad a=lnicola This is still not ideal because the label displays the crate that was just checked, not the one that's currently being checked. But it should give the impression of being faster. Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>

view details

push time in 2 hours

PR opened rust-analyzer/rust-analyzer

Reduce visibility

bors r+ 🤖

+81 -76

0 comment

3 changed files

pr created time in 2 hours

push eventrust-analyzer/rust-analyzer

matklad

commit sha 08fc6f1bf5921eac4ed187c2212159c0c14afda1

Automated deployment: Wed Feb 26 12:06:40 UTC 2020 5c64ad27e041bcdb281c0a751720ceb3a6369d04

view details

push time in 2 hours

Pull request review commentrust-analyzer/rust-analyzer

Introduce Semantics API

+//! See `Semantics`.++use std::{cell::RefCell, fmt, iter::successors};++use hir_def::{+    resolver::{self, HasResolver, Resolver},+    TraitId,+};+use ra_db::{FileId, FileRange};+use ra_syntax::{ast, AstNode, SyntaxNode, SyntaxToken, TextRange, TextUnit};+use rustc_hash::{FxHashMap, FxHashSet};++use crate::{+    db::HirDatabase,+    source_analyzer::{resolve_hir_path, ReferenceDescriptor, SourceAnalyzer},+    source_binder::{ChildContainer, SourceBinder, ToDef},+    Function, HirFileId, InFile, Local, MacroDef, Module, Name, Origin, Path, PathResolution,+    ScopeDef, StructField, Trait, Type, TypeParam, VariantDef,+};+use ra_prof::profile;++/// Primary API to get semantic information, like types, from syntax trees.+pub struct Semantics<'db, DB> {+    pub db: &'db DB,+    pub(crate) sb: RefCell<SourceBinder>,+    cache: RefCell<FxHashMap<SyntaxNode, HirFileId>>,+}++impl<DB> fmt::Debug for Semantics<'_, DB> {+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+        write!(f, "Semantics {{ ... }}")+    }+}++impl<'db, DB: HirDatabase> Semantics<'db, DB> {+    pub fn new(db: &DB) -> Semantics<DB> {+        let sb = RefCell::new(SourceBinder::new());+        Semantics { db, sb, cache: RefCell::default() }+    }++    pub fn parse(&self, file_id: FileId) -> ast::SourceFile {+        let tree = self.db.parse(file_id).tree();+        self.cache(tree.syntax().clone(), file_id.into());+        tree+    }++    pub fn expand(&self, macro_call: &ast::MacroCall) -> Option<SyntaxNode> {+        let macro_call = self.find_file(macro_call.syntax().clone()).with_value(macro_call);+        let sa = self.analyze2(macro_call.map(|it| it.syntax()), None);+        let file_id = sa.expand(self.db, macro_call)?;+        let node = self.db.parse_or_expand(file_id)?;+        self.cache(node.clone(), file_id);+        Some(node)+    }++    pub fn descend_into_macros(&self, token: SyntaxToken) -> SyntaxToken {+        let parent = token.parent();+        let parent = self.find_file(parent);+        let sa = self.analyze2(parent.as_ref(), None);++        let token = successors(Some(parent.with_value(token)), |token| {+            let macro_call = token.value.ancestors().find_map(ast::MacroCall::cast)?;+            let tt = macro_call.token_tree()?;+            if !token.value.text_range().is_subrange(&tt.syntax().text_range()) {+                return None;+            }+            let file_id = sa.expand(self.db, token.with_value(&macro_call))?;+            let token = file_id.expansion_info(self.db)?.map_token_down(token.as_ref())?;++            self.cache(find_root(&token.value.parent()), token.file_id);++            Some(token)+        })+        .last()+        .unwrap();++        token.value+    }++    pub fn original_range(&self, node: &SyntaxNode) -> FileRange {+        let node = self.find_file(node.clone());+        original_range(self.db, node.as_ref())+    }++    pub fn ancestors_with_macros(&self, node: SyntaxNode) -> impl Iterator<Item = SyntaxNode> + '_ {+        let node = self.find_file(node);+        node.ancestors_with_macros(self.db).map(|it| it.value)+    }++    pub fn type_of_expr(&self, expr: &ast::Expr) -> Option<Type> {+        self.analyze(expr.syntax()).type_of(self.db, &expr)+    }++    pub fn type_of_pat(&self, pat: &ast::Pat) -> Option<Type> {+        self.analyze(pat.syntax()).type_of_pat(self.db, &pat)+    }++    pub fn resolve_method_call(&self, call: &ast::MethodCallExpr) -> Option<Function> {+        self.analyze(call.syntax()).resolve_method_call(call)+    }++    pub fn resolve_field(&self, field: &ast::FieldExpr) -> Option<StructField> {+        self.analyze(field.syntax()).resolve_field(field)+    }++    pub fn resolve_record_field(&self, field: &ast::RecordField) -> Option<StructField> {+        self.analyze(field.syntax()).resolve_record_field(field)+    }++    pub fn resolve_record_literal(&self, record_lit: &ast::RecordLit) -> Option<VariantDef> {+        self.analyze(record_lit.syntax()).resolve_record_literal(record_lit)+    }++    pub fn resolve_record_pattern(&self, record_pat: &ast::RecordPat) -> Option<VariantDef> {+        self.analyze(record_pat.syntax()).resolve_record_pattern(record_pat)+    }++    pub fn resolve_macro_call(&self, macro_call: &ast::MacroCall) -> Option<MacroDef> {+        let sa = self.analyze(macro_call.syntax());+        let macro_call = self.find_file(macro_call.syntax().clone()).with_value(macro_call);+        sa.resolve_macro_call(self.db, macro_call)+    }++    pub fn resolve_path(&self, path: &ast::Path) -> Option<PathResolution> {+        self.analyze(path.syntax()).resolve_path(self.db, path)+    }++    // FIXME: use this instead?+    // pub fn resolve_name_ref(&self, name_ref: &ast::NameRef) -> Option<???>;++    pub fn to_def<T: ToDef + Clone>(&self, src: &T) -> Option<T::Def> {+        let src = self.find_file(src.syntax().clone()).with_value(src.clone());+        let mut sb = self.sb.borrow_mut();+        T::to_def(self.db, &mut sb, src)+    }++    pub fn to_module_def(&self, file: FileId) -> Option<Module> {+        let mut sb = self.sb.borrow_mut();+        sb.to_module_def(self.db, file)+    }++    pub fn scope(&self, node: &SyntaxNode) -> SemanticsScope<'db, DB> {+        let node = self.find_file(node.clone());+        let resolver = self.analyze2(node.as_ref(), None).resolver;+        SemanticsScope { db: self.db, resolver }+    }++    pub fn scope_at_offset(&self, node: &SyntaxNode, offset: TextUnit) -> SemanticsScope<'db, DB> {+        let node = self.find_file(node.clone());+        let resolver = self.analyze2(node.as_ref(), Some(offset)).resolver;+        SemanticsScope { db: self.db, resolver }+    }++    pub fn scope_for_def(&self, def: Trait) -> SemanticsScope<'db, DB> {+        let resolver = def.id.resolver(self.db);+        SemanticsScope { db: self.db, resolver }+    }++    // FIXME: we only use this in `inline_local_variable` assist, ideally, we+    // should switch to general reference search infra there.+    pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> {+        self.analyze(pat.syntax()).find_all_refs(pat)+    }++    fn analyze(&self, node: &SyntaxNode) -> SourceAnalyzer {+        let src = self.find_file(node.clone());+        self.analyze2(src.as_ref(), None)+    }++    fn analyze2(&self, src: InFile<&SyntaxNode>, offset: Option<TextUnit>) -> SourceAnalyzer {+        let _p = profile("SourceBinder::analyzer");++        let container = match self.sb.borrow_mut().find_container(self.db, src) {+            Some(it) => it,+            None => return SourceAnalyzer::new_for_resolver(Resolver::default(), src),+        };++        let resolver = match container {+            ChildContainer::DefWithBodyId(def) => {+                return SourceAnalyzer::new_for_body(self.db, def, src, offset)+            }+            ChildContainer::TraitId(it) => it.resolver(self.db),+            ChildContainer::ImplId(it) => it.resolver(self.db),+            ChildContainer::ModuleId(it) => it.resolver(self.db),+            ChildContainer::EnumId(it) => it.resolver(self.db),+            ChildContainer::VariantId(it) => it.resolver(self.db),+            ChildContainer::GenericDefId(it) => it.resolver(self.db),+        };+        SourceAnalyzer::new_for_resolver(resolver, src)+    }++    fn cache(&self, root_node: SyntaxNode, file_id: HirFileId) {+        assert!(root_node.parent().is_none());+        let mut cache = self.cache.borrow_mut();+        let prev = cache.insert(root_node, file_id);+        assert!(prev == None || prev == Some(file_id))+    }++    pub fn assert_contains_node(&self, node: &SyntaxNode) {+        self.find_file(node.clone());+    }++    fn lookup(&self, root_node: &SyntaxNode) -> Option<HirFileId> {+        let cache = self.cache.borrow();+        cache.get(root_node).copied()+    }++    fn find_file(&self, node: SyntaxNode) -> InFile<SyntaxNode> {+        let root_node = find_root(&node);+        let file_id = self.lookup(&root_node).unwrap_or_else(|| {+            panic!(+                "\n\nFailed to lookup {:?} in this Semantics.\n\+                 Make sure to use only query nodes, derived from this instance of Semantics.\n\

Yeah... A path forward is to add that u32 to rowan, as we originally planned, and add an interned query for TreeProvenance or some such.

matklad

comment created time in 2 hours

push eventrust-analyzer/rust-analyzer

Aleksey Kladov

commit sha c3a4c4429de83450654795534e64e878a774a088

Refactor primary IDE API This introduces the new type -- Semantics. Semantics maps SyntaxNodes to various semantic info, such as type, name resolution or macro expansions. To do so, Semantics maintains a HashMap which maps every node it saw to the file from which the node originated. This is enough to get all the necessary hir bits just from syntax.

view details

Aleksey Kladov

commit sha 5c64ad27e041bcdb281c0a751720ceb3a6369d04

Merge pull request #3222 from matklad/identity Introduce Semantics API

view details

push time in 2 hours

delete branch matklad/rust-analyzer

delete branch : identity

delete time in 2 hours

PR merged rust-analyzer/rust-analyzer

Introduce Semantics API

Based on ideas in https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Design.20question.3A.20identity.20in.20syntax.20trees

+1027 -979

8 comments

49 changed files

matklad

pr closed time in 2 hours

pull request commentrust-analyzer/rust-analyzer

Introduce Semantics API

bors r+

matklad

comment created time in 2 hours

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha c3a4c4429de83450654795534e64e878a774a088

Refactor primary IDE API This introduces the new type -- Semantics. Semantics maps SyntaxNodes to various semantic info, such as type, name resolution or macro expansions. To do so, Semantics maintains a HashMap which maps every node it saw to the file from which the node originated. This is enough to get all the necessary hir bits just from syntax.

view details

push time in 2 hours

push eventmatklad/rust-analyzer

Jeremy Kolb

commit sha 8f6f864547bad3d2bb34ea0cf5a32e8adee58c4e

Semantic Ranges

view details

kjeremy

commit sha fa355d6339d7b5ccfd4b1a96f035a4366e8152fe

Rename back to highlight and check event's again highlight range

view details

bors[bot]

commit sha ae0aeb1b23aa4bc96a7113de784799365c2b4358

Merge #3307 3307: Semantic Ranges r=matklad a=kjeremy Co-authored-by: Jeremy Kolb <kjeremy@gmail.com> Co-authored-by: kjeremy <kjeremy@gmail.com>

view details

Aleksey Kladov

commit sha 52fd19621caa62ddd7d3f29b69a5133650bc1294

Remove code duplication in tests

view details

Aleksey Kladov

commit sha 80466228712e5a071f09535676f080a71c69024d

Actually drop unicase dependency

view details

Aleksey Kladov

commit sha 21fa338bd61bf6d4959b7f052d4f89d4594e419b

Merge pull request #3316 from matklad/dedup Remove code duplication in tests

view details

Aleksey Kladov

commit sha 04deae3dba7c9b7054f7a1d64e4b93a05aecc132

Merge pull request #3317 from matklad/no-unicase Actually drop unicase dependency

view details

Aleksey Kladov

commit sha 03b2b864633649c5135caef08b139cfc71455b44

Refactor primary IDE API This introduces the new type -- Semantics. Semantics maps SyntaxNodes to various semantic info, such as type, name resolution or macro expansions. To do so, Semantics maintains a HashMap which maps every node it saw to the file from which the node originated. This is enough to get all the necessary hir bits just from syntax.

view details

push time in 2 hours

issue commentrust-analyzer/rust-analyzer

Panic in inlay_hints

Or gists

kjeremy

comment created time in 3 hours

push eventrust-analyzer/rust-analyzer

matklad

commit sha 3e12dde073172e54a30a8a6d6353c9365d6db744

Automated deployment: Wed Feb 26 11:02:58 UTC 2020 21fa338bd61bf6d4959b7f052d4f89d4594e419b

view details

push time in 3 hours

push eventrust-analyzer/rust-analyzer

matklad

commit sha 50014e0b5682f236fc601f592173c503c7a95a80

Automated deployment: Wed Feb 26 11:02:35 UTC 2020 04deae3dba7c9b7054f7a1d64e4b93a05aecc132

view details

push time in 3 hours

push eventrust-analyzer/rust-analyzer

Aleksey Kladov

commit sha 80466228712e5a071f09535676f080a71c69024d

Actually drop unicase dependency

view details

Aleksey Kladov

commit sha 04deae3dba7c9b7054f7a1d64e4b93a05aecc132

Merge pull request #3317 from matklad/no-unicase Actually drop unicase dependency

view details

push time in 3 hours

delete branch matklad/rust-analyzer

delete branch : no-unicase

delete time in 3 hours

PR merged rust-analyzer/rust-analyzer

Actually drop unicase dependency

bors r+ 🤖

+0 -19

1 comment

3 changed files

matklad

pr closed time in 3 hours

pull request commentrust-analyzer/rust-analyzer

Actually drop unicase dependency

bors r+

matklad

comment created time in 3 hours

push eventrust-analyzer/rust-analyzer

Aleksey Kladov

commit sha 52fd19621caa62ddd7d3f29b69a5133650bc1294

Remove code duplication in tests

view details

Aleksey Kladov

commit sha 21fa338bd61bf6d4959b7f052d4f89d4594e419b

Merge pull request #3316 from matklad/dedup Remove code duplication in tests

view details

push time in 3 hours

delete branch matklad/rust-analyzer

delete branch : dedup

delete time in 3 hours

PR merged rust-analyzer/rust-analyzer

Remove code duplication in tests

bors r+ 🤖

+74 -101

2 comments

3 changed files

matklad

pr closed time in 3 hours

issue openedbors-ng/bors-ng

Bors is dead right now :(

bors r+ does not work, and dashbord does not function as well:

image

created time in 3 hours

pull request commentbors-ng/bors-ng

When retrying a merge-conflict branch, don't comment

Hm, I am not sure that the original bug was because of chattines: bors made a spree of comments with very short interval between them. So to me it looked like a bug with a retry logic which fired more times than it should have

notriddle

comment created time in 3 hours

pull request commentrust-analyzer/rust-analyzer

Remove code duplication in tests

bors ping

matklad

comment created time in 3 hours

pull request commentrust-analyzer/rust-analyzer

Remove code duplication in tests

bors r+

matklad

comment created time in 3 hours

issue openedmitsuhiko/insta

Feature request: make console an optional dependency

At the moment insta library uses console as a dependency, which pulls in a number of other deps, including heavy ones like regex. My understanding is that this is not the core functionality: monochrome diffs are workable, and you always can use insta binary to get extra colors. So, for users which want to minimize dependencies, it would be beneficial if console could be disabled.

created time in 3 hours

PR opened rust-analyzer/rust-analyzer

Actually drop unicase dependency

bors r+ 🤖

+0 -19

0 comment

3 changed files

pr created time in 3 hours

create barnchmatklad/rust-analyzer

branch : no-unicase

created branch time in 3 hours

create barnchmatklad/rust-analyzer

branch : dedup

created branch time in 4 hours

PR opened rust-analyzer/rust-analyzer

Remove code duplication in tests

bors r+ 🤖

+74 -101

0 comment

3 changed files

pr created time in 4 hours

pull request commentrust-analyzer/text_unit

Add extend_to for TextRange

published as 0.1.10

edwin0cheng

comment created time in 4 hours

push eventrust-analyzer/text_unit

Aleksey Kladov

commit sha af901ad23af20fb8b32440e610d23bc34e2901b0

Publish v0.1.10

view details

push time in 4 hours

push eventferrous-systems/teaching-material

skade

commit sha 0b81efba8b4c263b72b178cd23426fb37b487fb2

Automated deployment: Wed Feb 26 07:51:30 UTC 2020 ee887f2ce3776a3442c7ebaa4b607a9e11924eb4

view details

push time in 6 hours

pull request commentrust-analyzer/rust-analyzer

Semantic Ranges

Well, I don’t see highlighting until I start editing code :)

On Tuesday, 25 February 2020, Laurențiu Nicola notifications@github.com wrote:

But I haven't seen a highlighting bug since I disabled the rainbow thingy last year 😆.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rust-analyzer/rust-analyzer/pull/3307?email_source=notifications&email_token=AANB3MZFA6WCMTBDUMT4243REWGRNA5CNFSM4K3N5CW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM5UEZI#issuecomment-591086181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANB3M6LUU4PTO6667RAA3TREWGRNANCNFSM4K3N5CWQ .

kjeremy

comment created time in 16 hours

pull request commentrust-analyzer/rust-analyzer

Semantic Ranges

I definitely hope for fewer highlighting bugs per second here :)

On Tuesday, 25 February 2020, Jeremy Kolb notifications@github.com wrote:

@lnicola https://github.com/lnicola

If I run this branch on insiders with the necessary changes to the client (this uses the textDocument/semantcTokens request) it definitely colors faster than on stable but I'm not sure what accounts for that.

We still use the machinery in syntax_highlighting so at the moment generating tokens will stay the same.

If the client sends textDocument/semanticTokens/range requests for a viewport (this PR) it could potentially be faster since we wouldn't need to generate or transmit tokens for the whole file. There is also the textDocument/semanticTokens/edits request which is supposed to efficiently report deltas between document revisions. I have yet to see either of these requests in the insiders build when we advertise the features.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rust-analyzer/rust-analyzer/pull/3307?email_source=notifications&email_token=AANB3M4QCYY3GKBJOV54CTDREWFQZA5CNFSM4K3N5CW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM5TFPY#issuecomment-591082175, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANB3M7CVOSCSP3YAP46JTDREWFQZANCNFSM4K3N5CWQ .

kjeremy

comment created time in 16 hours

push eventrust-analyzer/rust-analyzer

bors[bot]

commit sha 4eba66f4268a8879cf717f27d234bc0faf6003f5

Automated deployment: Tue Feb 25 21:21:02 UTC 2020 ae0aeb1b23aa4bc96a7113de784799365c2b4358

view details

push time in 17 hours

pull request commentrust-analyzer/rust-analyzer

Semantic Ranges

bors r+

kjeremy

comment created time in 17 hours

Pull request review commentrust-analyzer/rust-analyzer

Semantic Ranges

 pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa      let mut in_macro_call = None; +    // Determine the root based on the range+    let root = match range {+        Some(range) => match root.covering_element(range) {+            NodeOrToken::Node(node) => node,+            NodeOrToken::Token(token) => token.parent(),+        },+        None => root,+    };+     for event in root.preorder_with_tokens() {         match event {

For every event: if parent happens to be a big node, like an impl, we might process unnecessary children

kjeremy

comment created time in 19 hours

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 75f601518794d4d2d04da0286f5ce31ee146c396

Refactor primary IDE API This introduces the new type -- Semantics. Semantics maps SyntaxNodes to various semantic info, such as type, name resolution or macro expansions. To do so, Semantics maintains a HashMap which maps every node it saw to the file from which the node originated. This is enough to get all the necessary hir bits just from syntax.

view details

push time in 21 hours

Pull request review commentrust-analyzer/rust-analyzer

Semantic Ranges

 pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa      let mut in_macro_call = None; +    // Determine the root based on the range+    let root = match range {+        Some(range) => match root.covering_element(range) {+            NodeOrToken::Node(node) => node,+            NodeOrToken::Token(token) => token.parent(),+        },+        None => root,+    };+     for event in root.preorder_with_tokens() {         match event {

Let's also add a quick

if element.text_range().intersection(range_to_highlight).is_none() { continue }
kjeremy

comment created time in 21 hours

Pull request review commentrust-analyzer/rust-analyzer

Semantic Ranges

 fn is_control_keyword(kind: SyntaxKind) -> bool {  pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRange> {     let _p = profile("highlight");+    highlight_range(db, file_id, None)+}++pub(crate) fn highlight_range(

I suggest having only

pub(crate) fn highlight(
    db: &RootDatabase,
    file_id: FileId,
    range: Option<TextRange>,
) 
kjeremy

comment created time in 21 hours

pull request commentrust-analyzer/rust-analyzer

Nth iteration of expression analysis API

I think this is ready for review @flodiebold !

The public API looks good to me: we now have a single Semantics type, which handles all the things. We also don't really use HirFileId in public API anymore, except for HasSource trait.

The implementation is unfortunatelly still split between sa, sb and semantics :(

matklad

comment created time in 21 hours

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 2f148db8906328217de9bb0bf0e98b985a7bcdf2

Yet another attempt at nice API

view details

push time in 21 hours

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 1cbd839bb45940d0536e9cdbeef82bd1ec53ccaa

Yet another attempt at nice API

view details

push time in 21 hours

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 957b2f31d89fd4fb6475275bdfbe3d54586d5c10

Yet another attempt at nice API

view details

push time in 21 hours

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 1f6cd5c8f15e6cc124013b9278c97966627df77c

Yet another attempt at nice API

view details

push time in 21 hours

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 419818b435196458c55008d58caedb24f4721102

vis

view details

push time in a day

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha e92212a83ea244dc11ac8339a6e84cd9c56f529f

Simplify

view details

push time in a day

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 9d0d61d196385579889db2a28149cea3f0799b0e

WIP

view details

Aleksey Kladov

commit sha 790993d8504800d19d9e6e3ba403815c5062bae2

remove lifetime

view details

Aleksey Kladov

commit sha b4e3a297d538b322bf0e313912c5f518b139b6ee

wip

view details

push time in a day

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha dc5b6a8df8c48d15933aded3c68b92fa17218cbf

Make things private

view details

Aleksey Kladov

commit sha 0ff0e51bc0f12a7c3a16f2010f5539ea6e61c6ac

WIP

view details

push time in a day

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha b984d66361e5c5170c9d8aaa31acf27c8adafbea

wip

view details

push time in a day

pull request commentrust-analyzer/text_unit

Add extend_to for TextRange

let's rename the test as well

bors d+

edwin0cheng

comment created time in a day

pull request commentrust-analyzer/text_unit

Add extend_to for TextRange

bors r-

edwin0cheng

comment created time in a day

pull request commentrust-analyzer/text_unit

Add extend_to for TextRange

bors r+

edwin0cheng

comment created time in a day

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 469011169bb2579ca8d7c16eefd2fe297136f976

:arrow_up: rowan

view details

bors[bot]

commit sha 7763f425d98d630321eb5ace739bab489504a76f

Merge #3304 3304: :arrow_up: rowan r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>

view details

Aleksey Kladov

commit sha d7da42bd402aedb167bfb33aec7ce61279716ff7

Simplify

view details

bors[bot]

commit sha d3040c0deba8266044029a6479a1c12c28e72750

Merge #3305 3305: Simplify r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>

view details

Aleksey Kladov

commit sha 7383dca42cb36279af80389f5ad13c68eb49bd3a

Yet another attempt at nice API

view details

Aleksey Kladov

commit sha bd2d5bfaadc3ed5ec8b2bc088e3c9959f91a55f9

wip

view details

Aleksey Kladov

commit sha 23f1da7412c519b8b486bda28ba8792b6a375cdc

wip

view details

push time in a day

pull request commentrust-analyzer/text_unit

Add convex_hull for TextRange

Yeah, not happy with the name either, opened https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0

edwin0cheng

comment created time in a day

PR closed rust-analyzer/rowan

Reviewers
Maybe a mistake fix

?

+1 -1

3 comments

1 changed file

Veetaha

pr closed time in a day

pull request commentrust-analyzer/rowan

Maybe a mistake fix

Yep, text offset can point right at the end of the node/file, it can be equal to the length of the thing.

Veetaha

comment created time in a day

push eventrust-analyzer/rust-analyzer

bors[bot]

commit sha b3ab04038338162fcaaf3872c5434027bed9f4da

Automated deployment: Tue Feb 25 14:09:07 UTC 2020 d3040c0deba8266044029a6479a1c12c28e72750

view details

push time in a day

PR opened rust-analyzer/rust-analyzer

Simplify

bors r+ 🤖

+13 -11

0 comment

1 changed file

pr created time in a day

create barnchmatklad/rust-analyzer

branch : simpligy

created branch time in a day

push eventrust-analyzer/rust-analyzer

bors[bot]

commit sha 8b519c8aed3d9e0b4f08e7eed12ec3e5b875175f

Automated deployment: Tue Feb 25 13:57:48 UTC 2020 7763f425d98d630321eb5ace739bab489504a76f

view details

push time in a day

PR opened rust-analyzer/rust-analyzer

:arrow_up: rowan

bors r+ 🤖

+3 -3

0 comment

2 changed files

pr created time in a day

create barnchmatklad/rust-analyzer

branch : rowan

created branch time in a day

push eventrust-analyzer/rowan

Aleksey Kladov

commit sha 410909c429d107f425c30d76a2a809f830a679a5

Fix pointer equality to actually be based on identity

view details

push time in a day

issue closedrust-analyzer/rust-analyzer

Command 'rust-analyzer.onEnter' not found

Due to network issues, I temporarily stayed in the 2019-02-11 version, and I got "command'rust-analyzer.onEnter not found" when I tried to enter a newline in vscode.

In fact, I didn't get a newline either, obviously, we affected the normal operation of the editor.

closed time in a day

PsiACE

issue commentrust-analyzer/rust-analyzer

Command 'rust-analyzer.onEnter' not found

I believe this is fixed in the latest release

PsiACE

comment created time in a day

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 6542ab89ceb32d6ec108a28ad9d938d24762c029

Simplify

view details

bors[bot]

commit sha 744ec58bc3c6bc0fbffda3c9bf5ad975a1542702

Merge #3303 3303: Simplify r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>

view details

Aleksey Kladov

commit sha cc5ff0c4a8903ed00cd2299742f02f8583ade554

Yet another attempt at nice API

view details

push time in a day

push eventrust-analyzer/rust-analyzer

bors[bot]

commit sha 53320d2fdc39cb6a9cab6a032988ffc12ba7252c

Automated deployment: Tue Feb 25 13:01:03 UTC 2020 744ec58bc3c6bc0fbffda3c9bf5ad975a1542702

view details

push time in a day

delete branch matklad/rust-analyzer

delete branch : nav

delete time in a day

push eventmatklad/rust-analyzer

Veetaha

commit sha b4db089a6b79ae60dec9fcd0ba2d788a494c8d8f

add error handling to fetchArtifactReleaseInfo(), throw Error when no artifact found

view details

Veetaha

commit sha af57251c311220c2f93a75a6105e6472ffc8ebaa

vscode: remove type assertion

view details

Laurențiu Nicola

commit sha ed69482d90804c37d8ee60c63f0f51f20a6638f5

Bump chalk and replace TypeFamily with Interner

view details

Veetaha

commit sha 6ec4a7db42be5980f7a4b20f349cb10709dbf71b

vscode: wrap non-single-line if body with curlies as per matklad

view details

bors[bot]

commit sha c4c15363fbb18d02e01aae9ffd386ff93446c0a3

Merge #3295 3295: Refactoring fetchArtifactReleaseInfo() r=matklad a=Veetaha https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md I fact this rule doesn't work when you put an unnecessary non-null assertion in an expression (as we had `(awat f())!`, but it is useful in other cases... Closes #3295, i guess... Co-authored-by: Veetaha <gerzoh1@gmail.com>

view details

Aleksey Kladov

commit sha 136151515abffabdedbe0087f8fc21a67c071dc6

Replace generic with a concrete type

view details

bors[bot]

commit sha e9c9f47fe06023a1807c0d405be739f8d5f5e276

Merge #3302 3302: Replace generic with a concrete type r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>

view details

bors[bot]

commit sha 3853a3b6436e48a7e13dc75bfe6391fa1275f235

Merge #3298 3298: Bump chalk and replace TypeFamily with Interner r=flodiebold a=lnicola Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>

view details

Aleksey Kladov

commit sha d0c2a13e5efdc072cf42cfd6c1f5774d890c7dcd

Yet another attempt at nice API

view details

push time in a day

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 380de18e5132762f52182fa3fac55386d65f6a19

Yet another attempt at nice API

view details

push time in a day

create barnchmatklad/rust-analyzer

branch : nav

created branch time in a day

PR opened rust-analyzer/rust-analyzer

Simplify

bors r+ 🤖

+7 -15

0 comment

2 changed files

pr created time in a day

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 29f612833ed45f7353df535b702cb91e0c70f18b

WIP

view details

push time in a day

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 71abb3b36ed095e525e0ff82ed0dc309e5116528

WIP

view details

push time in a day

push eventmatklad/rust-analyzer

Aleksey Kladov

commit sha 015b1c930c58a592ef3b3e8c90759c97e8bfe9be

WIP

view details

push time in a day

push eventrust-analyzer/rust-analyzer

bors[bot]

commit sha ebb6c22fcdb3b9506aac04a6c69c5dffa8f77705

Automated deployment: Tue Feb 25 12:11:48 UTC 2020 3853a3b6436e48a7e13dc75bfe6391fa1275f235

view details

push time in a day

more