Hello community,
here is the log from the commit of package racer for openSUSE:Factory checked in at 2017-05-04 15:05:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/racer (Old)
and /work/SRC/openSUSE:Factory/.racer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "racer"
Thu May 4 15:05:23 2017 rev:3 rq:492762 version:2.0.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/racer/racer.changes 2017-02-16 16:51:24.731775965 +0100
+++ /work/SRC/openSUSE:Factory/.racer.new/racer.changes 2017-05-04 15:05:25.753762810 +0200
@@ -1,0 +2,6 @@
+Tue May 2 21:18:50 UTC 2017 - luke.nukem.jones@gmail.com
+
+- resolve Self (e.g. in-impl function calls like Self::myfunction())
+- Fix stack overflow issue on unresolvable imports
+
+-------------------------------------------------------------------
Old:
----
racer-2.0.5.tar.gz
New:
----
racer-2.0.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ racer.spec ++++++
--- /var/tmp/diff_new_pack.n51G2O/_old 2017-05-04 15:05:28.809331405 +0200
+++ /var/tmp/diff_new_pack.n51G2O/_new 2017-05-04 15:05:28.809331405 +0200
@@ -20,7 +20,7 @@
Name: racer
-Version: 2.0.5
+Version: 2.0.6
Release: 0
Summary: Code completion for Rust
License: MIT
@@ -35,8 +35,8 @@
BuildRequires: cargo
BuildRequires: git
-BuildRequires: rust >= 1.14.0
-BuildRequires: rust-std >= 1.14.0
+BuildRequires: rust
+BuildRequires: rust-std
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ racer-2.0.5.tar.gz -> racer-2.0.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/racer-2.0.5/CHANGELOG.md new/racer-2.0.6/CHANGELOG.md
--- old/racer-2.0.5/CHANGELOG.md 2017-01-16 20:47:26.000000000 +0100
+++ new/racer-2.0.6/CHANGELOG.md 2017-02-17 17:32:13.000000000 +0100
@@ -4,6 +4,11 @@
All notable changes to this project will be documented in this file. This
project adheres to [Semantic Versioning](http://semver.org/).
+## 2.0.6
+
+- resolve Self (e.g. in-impl function calls like Self::myfunction())
+- Fix stack overflow issue on unresolvable imports :tada: #698
+
## 2.0.5
- Chained completions on separate lines now work #686
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/racer-2.0.5/Cargo.lock new/racer-2.0.6/Cargo.lock
--- old/racer-2.0.5/Cargo.lock 2017-01-16 20:47:26.000000000 +0100
+++ new/racer-2.0.6/Cargo.lock 2017-02-17 17:32:13.000000000 +0100
@@ -1,6 +1,6 @@
[root]
name = "racer"
-version = "2.0.5"
+version = "2.0.6"
dependencies = [
"clap 2.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/racer-2.0.5/Cargo.toml new/racer-2.0.6/Cargo.toml
--- old/racer-2.0.5/Cargo.toml 2017-01-16 20:47:26.000000000 +0100
+++ new/racer-2.0.6/Cargo.toml 2017-02-17 17:32:13.000000000 +0100
@@ -1,7 +1,7 @@
[package]
name = "racer"
-version = "2.0.5"
+version = "2.0.6"
license = "MIT"
description = "Code completion for Rust"
authors = ["Phil Dawes "]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/racer-2.0.5/src/racer/core.rs new/racer-2.0.6/src/racer/core.rs
--- old/racer-2.0.5/src/racer/core.rs 2017-01-16 20:47:26.000000000 +0100
+++ new/racer-2.0.6/src/racer/core.rs 2017-02-17 17:32:13.000000000 +0100
@@ -11,6 +11,7 @@
use std::iter::{Fuse, Iterator};
use std::rc::Rc;
use codeiter::StmtIndicesIter;
+use matchers::PendingImports;
use scopes;
use nameres;
@@ -947,8 +948,8 @@
let path = Path::from_vec(is_global, v);
for m in nameres::resolve_path(&path, filepath, pos,
- SearchType::StartsWith, Namespace::Both,
- session) {
+ SearchType::StartsWith, Namespace::Both,
+ session, &PendingImports::empty()) {
out.push(m);
}
},
@@ -1082,7 +1083,7 @@
nameres::resolve_path(&path, filepath, pos,
SearchType::ExactMatch, Namespace::Both,
- session).nth(0)
+ session, &PendingImports::empty()).nth(0)
},
CompletionType::Field => {
let context = ast::get_type_of(contextstr.to_owned(), filepath, pos, session);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/racer-2.0.5/src/racer/matchers.rs new/racer-2.0.6/src/racer/matchers.rs
--- old/racer-2.0.5/src/racer/matchers.rs 2017-01-16 20:47:26.000000000 +0100
+++ new/racer-2.0.6/src/racer/matchers.rs 2017-02-17 17:32:13.000000000 +0100
@@ -1,15 +1,25 @@
use {scopes, typeinf, ast};
use core::{Match, PathSegment, Src, Session, Coordinate, SessionExt};
-use util::{symbol_matches, txt_matches, find_ident_end, is_ident_char, char_at};
+use util::{StackLinkedListNode, symbol_matches, txt_matches, find_ident_end, is_ident_char, char_at};
use nameres::{get_module_file, get_crate_file, resolve_path};
use core::SearchType::{self, StartsWith, ExactMatch};
use core::MatchType::{self, Let, Module, Function, Struct, Type, Trait, Enum, EnumVariant,
Const, Static, IfLet, WhileLet, For, Macro};
use core::Namespace;
-use std::cell::Cell;
use std::path::Path;
use std::{iter, option, str, vec};
+/// The location of an import (`use` item) currently being resolved.
+#[derive(PartialEq, Eq)]
+pub struct PendingImport<'fp> {
+ filepath: &'fp Path,
+ blobstart: usize,
+ blobend: usize,
+}
+
+/// A stack of imports (`use` items) currently being resolved.
+pub type PendingImports<'stack, 'fp> = StackLinkedListNode<'stack, PendingImport<'fp>>;
+
pub type MIter = option::IntoIter<Match>;
pub type MChain<T> = iter::Chain;
@@ -17,14 +27,15 @@
pub fn match_types(src: Src, blobstart: usize, blobend: usize,
searchstr: &str, filepath: &Path,
search_type: SearchType,
- local: bool, session: &Session) -> iter::Chain>>>, vec::IntoIter<Match>> {
+ local: bool, session: &Session,
+ pending_imports: &PendingImports) -> iter::Chain>>>, vec::IntoIter<Match>> {
let it = match_extern_crate(&src, blobstart, blobend, searchstr, filepath, search_type, session).into_iter();
let it = it.chain(match_mod(src, blobstart, blobend, searchstr, filepath, search_type, local, session).into_iter());
let it = it.chain(match_struct(&src, blobstart, blobend, searchstr, filepath, search_type, local).into_iter());
let it = it.chain(match_type(&src, blobstart, blobend, searchstr, filepath, search_type, local).into_iter());
let it = it.chain(match_trait(&src, blobstart, blobend, searchstr, filepath, search_type, local).into_iter());
let it = it.chain(match_enum(&src, blobstart, blobend, searchstr, filepath, search_type, local).into_iter());
- it.chain(match_use(&src, blobstart, blobend, searchstr, filepath, search_type, local, session).into_iter())
+ it.chain(match_use(&src, blobstart, blobend, searchstr, filepath, search_type, local, session, pending_imports).into_iter())
}
pub fn match_values(src: Src, blobstart: usize, blobend: usize,
@@ -515,18 +526,30 @@
}
}
-// HACK: recursion protection. With 'use glob' statements it's easy to
-// get into a recursive loop and exchaust the stack. Currently we
-// avoid this by not following a glob if we're already searching
-// through one.
-thread_local!(static ALREADY_GLOBBING: Cell