elvish/eval
Qi Xiao f001c783d5 Lock EnvPathList correctly. This fixes #146.
Although there are no explicit writes to $paths in the test cases, there is
one hidden write: when the first search on external commands is done. Since
the internal cache of EnvPathList starts empty, EnvPathList.get() notices that
it needs to fetch the environment to update itself. However, the update first
modifies .cachedValue and then .cachedPaths. If another goroutine uses .get()
in the middle, it would think that the cache is actually up to date and uses
the outdated .cachedPaths, which is empty.

EnvPathList.get() is now correctly guarded by a write lock. The offending test
case has been uncommented as well.
2016-02-20 22:25:26 +01:00
..
acme.elv Implement two-way syncing between $env:PATH and $paths. 2016-02-19 02:12:10 +01:00
boilerplate.go Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
boilerplate.py Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
builtin_func.go eval: Add builtin lt and gt. 2016-02-20 21:20:18 +01:00
builtin_modules.bash Implement the use builtin. 2016-02-16 23:15:12 +01:00
builtin_modules.go Implement the use builtin. 2016-02-16 23:15:12 +01:00
builtin_special.go Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
closure.go Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
compileOp.go eval: Use location information in {,Values}Op. 2016-02-20 12:25:51 +01:00
compiler.go Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
compileValuesOp.go eval: Use location information in {,Values}Op. 2016-02-20 12:25:51 +01:00
compileVariablesOp.go Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
envPathList.go Lock EnvPathList correctly. This fixes #146. 2016-02-20 22:25:26 +01:00
error.go Remove GenericError. 2016-02-20 21:12:54 +01:00
eval_test.go Lock EnvPathList correctly. This fixes #146. 2016-02-20 22:25:26 +01:00
eval.go Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
externalcmd.go Implement pretty printing. 2016-02-19 20:11:31 +01:00
glob.go Implement pretty printing. 2016-02-19 20:11:31 +01:00
list.go Slightly simplify Repr. 2016-02-19 20:31:54 +01:00
map.go Slightly simplify Repr. 2016-02-19 20:31:54 +01:00
must.go Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
port.go eval: Introduce (*Port).Fork. 2016-02-09 01:40:36 +01:00
search.go Implement two-way syncing between $env:PATH and $paths. 2016-02-19 02:12:10 +01:00
string.go Slightly simplify Repr. 2016-02-19 20:31:54 +01:00
struct.go Slightly simplify Repr. 2016-02-19 20:31:54 +01:00
util.go Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
value_test.go Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
value.go Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00
variable.go Syncing from $env:PATH to $paths and ev.searchPaths. 2016-02-18 19:30:08 +01:00