Otherwise, busted may run a different interpreter than the one we
detected, without the capabilities we expect. (For instance, we might
have detected the luajit interpreter, but busted might run the lua
interpreter, without the ffi module.)
The TUI can be enabled/disabled at build time with -DFEAT_TUI, default is ON for
UNIX, and OFF for non UNIX. When off, Neovim prints a message to stderr, along
with a list of the server endpoints.
By default Neovim searched a Luajit instalation and linked against
the luajit library.
In practice Neovim only requires luajit to run the unit tests. All other
targets only require lua and the correct lua modules. This commit:
1. Remove the strict dependency on Luajit
2. Makes the unittest target depend on the lua 'ffi' module.
If the module is not available the target is not enabled
and a message is displayed.
This is needed as long as we support cmake older than 2.8.12. When we
bump the minimum version to 2.8.12, we can use target_compile_options()
and add_compile_options() instead.
Closes#4389
Change POROJECT_NAME to 'nvim', and use it as the gettext
domain name. The *.mo files, previously installed as
$runtime/lang/xx/LC_MESSAGES/nvim.mo, are now installed as
$prefix/locale/xx/LC_MESSAGES/nvim.mo.
Some toolchains apparently set _FORTIFY_SOURCE=2 in internal header
files. Include <string.h> (which in turn should include such internal
header files) before checking the value of _FORTIFY_SOURCE to catch
that.
Fixes#4183.
Features:
ef66249 tabline: Add %[] atom to the tabline, for random commands on click
f338ea7 job control: implement jobpid() to get PID of job
d0d5d17 job control: add 'detach' option to jobstart
7ad3f07 Add support for binary numbers
Fixes:
291495a regexp_nfa.c: Speed up find_match_text()
317d5ca input: Do not set high-bit; preserve ALT modifier.
3b7c409 shell: Unquote &shell* options before using them
Notable changes:
49b06a8 encoding: Always use "utf-8" as default for &encoding
79a6983 ui: revert "gui_running" hack
Other changes:
b4b4536 version: semver.org compliance
c6aa716 reproducible builds: Stop using __{DATE,TIME}__
46bd3c0 clipboard: Check $DISPLAY. Prefer xsel. #4150f6ecd12 job control: don't kill PTY processes on exit
49f0417 clipboard: Detach clipboard helper, so contents is kept after nvim exit
38435e8 python: Add missing I/O methods to RedirectStream
d26b01d eval: Use better error messages when failing to dump values
62d137c Remove swapsync.
In 33bc332, version constraints were added to pkg_search_module(), but
that only affects the set of directories searched by
find_library()/find_path().
Once the header directory is found, parse the version from
version_master.h so it can be checked by the find_package() call in the
root CMakeLists.txt.
When using the Visual Studio generator don't use get_target_property for
custom command, because it returns unexpanded VS variables (e.g.
$(Configuration)) within the result as part of the LOCATION path.
The single case where this is a problem is for getting the output path for
nvim-test, instead we use a path here.
The Visual Studio cmake generator creates subdirectories inside
the build path for different build configuration. But this breaks some of our
cmake scripts, like the help tags installer, that assume the targets are
built in that location. Updated CMakeLists.txt to remove extra paths.
- Check if MIN_LOG_LEVEL value is a number 0-3, default to
INFO (1) or ignore it in Release mode
- When TRAVIS_CI_BUILD is ON the default is DEBUG (0)
- Add local.mk.example
We use `git describe` to stamp pre-release versions (dev builds). But
`git describe` uses the result of the most-recent tag (the current
_release_ version)--so we must munge it with the _next_ (i.e.
unreleased) version.
Also fix non-git builds: do not invoke git_describe(NVIM_VERSION_MEDIUM)
if we're not in a git tree, else it gets the dummy value
"HEAD-HASH-NOTFOUND".
Example :version output in non-git build:
NVIM 0.1.2-dev
Example :version output in git build:
NVIM v0.1.2-176-g9c3c2b5
Without this compilation fails due to a missing symbol: SRWLOCK in libuv
headers. _WIN32_WINNT defines the Windows header version that is to be used,
and it seems libuv requires this version. See
b471b33da8
If nvim is built from a non-tagged commit, the truncated commit hash is
already appended to the main version string (e.g., "NVIM v0.1.0-83-g959f260 ..."),
making the "Commit:" field redundant.
Regarding the truncated hash length: we don't have nearly enough commits
to worry about collisions, and probably won't ever, so the default
length should be fine.
When building in a git repo:
- If HEAD corresponds to an annotated tag, (i.e. git_get_exact_tag()
returns truthy) the current build is considered a "release" build:
NVIM_VERSION_MEDIUM is directly assigned the tagged version name,
and NVIM_VERSION_* defines are ignored.
- If HEAD is not a tagged release, then NVIM_VERSION_MEDIUM is
directly assigned the result of `git describe`.
If git (or the repo) is not available:
- The NVIM_VERSION_* defines are used to define NVIM_VERSION_MEDIUM.
Sample outputs for `nvim --version` and `nvim +version`:
Building with git @ non-tagged commit e66df14:
NVIM v0.1.0-1-ge66df14 (compiled Nov 1 2015 19:10:30)
Commit: e66df148f9401be17adab324a6e41d927aae20b3
Building with git @ v0.1.1 tag:
NVIM v0.1.1 (compiled Nov 1 2015 19:03:52)
[no "Commit:" line]
Building this commit _not_ in a git repo:
NVIM 0.1.0-dev (compiled Nov 1 2015 19:16:11)
[no "Commit:" line]
Before this change, building Neovim would recursively search parent
directories for a .git directory. If Neovim was downloaded as a tarball
(i.e. without a .git directory), but placed in a subdirectory of
a Git repository, this caused a CMake error. Such a situation could
occur when packaging Neovim, for example.
Unfortunately, the previous attempt in #3317 did not fix this problem.
* Hide commit information from --version if we can't find any (e.g. when
building from tarball).
To define a release in CMake, set NVIM_VERSION_PRERELEASE to "".
This will modify --version output to:
* Show annotated Git tag instead of commit hash (NVIM_VERSION_COMMIT).
* Hide commit date (NVIM_VERSION_BUILD).
Introduce new build type Dev that replaces RelWithDebInfo for development
builds off master and has optimizations, debug info, and logging enabled.
Keep assertions enabled for RelWithDebInfo.
If downloading Neovim as a tarball (i.e. without Git data),
building Neovim will search parent directories for a .git directory.
Explicitly set GIT_DIR to the project directory to avoid that.
- There are some differences between stdio (*printf) functions in POSIX
and the MS runtime, this commit enables Mingw compatibility for these
functions
`nvim-[lang].1`:
The non-english manuals are completely outdated and still written in
roff, as opposed to mdoc, which is used for `nvim.1`.
Given that, they're nearly useless at the moment, and when/if they are
updated, they should probably be rewritten from scratch using `nvim.1`
as a reference.
`xxd*.1`:
xxd hasn't been in the source tree for a long time, so the manual is of
little use.
`nvimtutor*.1`:
The vimtutor script hasn't ever shipped with nvim, and the consensus
seems to be that it won't, at least in the form of an executable
installed alongside `$(PREFIX)/bin/nvim` (see #2700).
In `nvim.1`, the argument to the `.Os` macro was removed. This was done
because its only purpose was to signify that nvim and nvimtutor
were part of the "Neovim" distribution, i.e., one and the same, which
isn't applicable anymore because `nvimtutor.1` is being removed.
From the `.Os` documentation in `man mdoc`:
Os
Operating system version for display in the page footer. This is the
mandatory third macro of any mdoc file. Its syntax is as follows:
.Os [system [version]]
The optional system parameter specifies the relevant operating system or
environment. It is suggested to leave it unspecified, in which case
mandoc(1) uses its -Ios argument or, if that isn't specified either,
sysname and release as returned by uname(3).
Examples:
.Os
.Os KTH/CSC/TCS
.Os BSD 4.3
See also Dd and Dt.
Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
Reviewed-by: Florian Walch <florian@fwalch.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
[ci skip]
When checking code with check_c_source_compiles, the "check variable"
(for the _FORTIFY_SOURCE detection: previously _FORTIFY_SOURCE_ACCEPTABLE, now
HAS_ACCEPTABLE_FORTIFY) is passed to the compiler like
-D_FORTIFY_SOURCE_ACCEPTABLE. This throws off hardening-wrapper [1],
which then NOT sets _FORTIFY_SOURCE=2 for the check, assuming it had already
been set manually as it detected -D_FORTIFY_SOURCE*. Renaming the "check
variable" to not match this pattern works around this problem.
[1] https://github.com/thestinger/hardening-wrapper
Resolves#2632. This is done so C helper modules don't generate unexpected
coverage output.
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Florian Walch <florian@fwalch.com>
For now, only install man pages matching "nvim*.1": we don't want to
install xxd.1 as it might conflict with that of a user's Vim
installation.
closes#1826
Reviewed-by: Florian Walch <florian@fwalch.com>
Helped-by: John Szakmeister <john@szakmeister.net>
This will help make sure that we build all the right prereqs before
manually running tests under QuickBuild.
Notice that shell-test has been added as a prereq for the functional
tests, since it's a requirement for testing the terminal features.
Old behaviour: termopen('cmd') would run `&shell &shcf "cmd"`, which
caused the functional tests to fail on some systems due to the process
not "owning" the terminal. Also, it is inconsistent with jobstart().
Modify termopen() so that &shell is not invoked, but maintain the old
behaviour with :terminal. Factor the common code for building the
argument vector from jobstart() and modify the functional tests to call
termopen() instead of :terminal (fixes#2354).
Also:
* Add a 'name' option for termopen() so that `:terminal {cmd}` produces
a buffer named "term//{cwd}/{cmd}" and termopen() users can customize
the name.
* Update the documentation.
* Add functional tests for `:terminal` sinse its behaviour now differs
from termopen(). Add "test/functional/fixtures/shell-test.c" and move
"test/functional/job/tty-test.c" there, too.
Helped-by: Justin M. Keyes <@justinmk>
* Set JEMALLOC_NO_DEMANGLE to be able to use `je_*` functions,
regardless of how jemalloc was compiled (--with-jemalloc-prefix)
* Show jemalloc information in Neovim's version output.
Resolve#2449.
For built-in dependencies, shared libraries are removed and static
linking is always used.
For systemwide dependencies, static linking should not be used.
Jemalloc will be used if the cmake option `USE_JEMALLOC` is enabled(which is the
default). To avoid trouble with clang's ASAN, it is disabled by default if the
`SANITIZE` option is enabled.
Since jemalloc has thread cache for small objects, it fills the gap created by
removing klib memory pools.
The `xstrdup` funciton(memory.c) had to be reimplemented on top of `xmalloc` to
make it work with a custom allocator.
Problem: With some regexp patterns the NFA engine uses many states and
becomes very slow. To the user it looks like Vim freezes.
Solution: When the number of states reaches a limit fall back to the old
engine. (Christian Brabandt)
https://github.com/vim/vim/releases/tag/v7-4-497
Helped-by: David Bürgin <676c7473@gmail.com>
Helped-by: Justin M. Keyes <justinkz@gmail.com>
Helped-by: Scott Prager <splinterofchaos@gmail.com>
Get prefix to a -D_FORTIFY_SOURCE string if it is present in
CFLAGS and apply the prefix to flags added to redefine
_FORTIFY_SOURCE in CFLAGS and CPPFLAGS
* fixes 1569
It turns out the check was being performed without optimizations enabled
even when the CMAKE_BUILD_TYPE was set to a release build. This led to
_FORTIFY_SOURCE's level not being correctly determined, and us failing
to apply the correct workaround.
To counter this, we'll take the default flags for the build type and
apply them. Also, if options are passed via CFLAGS, they are
automatically passed on to the underlying build. So this should cover
all the necessary ground.
This fixes#1647.
- Caller can override bundled dependency location using
DEPS_PREFIX
- Cache variable DEPS_PREFIX, using .deps/usr by default
- Removed unused variables DEPS_BIN_DIR, DEPS_BUILD_DIR, DEPS_DIR
DEPS_INSTALL_DIR
- Corner case: if the caller tries to override DEPS_PREFIX after a
successful cmake configuration, the caller needs to clear the cache
because dependency checks are based on the old value
Some builds don't use Release (such as Gentoo, though it can be told
to). So let's go a bit further and probe the compiler to see if we need
to turn down the _FORTIFY_SOURCE level.
- If possble try to abstract away from Make, and use cmake --build
- third-party still needs to find Make to build some components
- Removed search for Make from CMakeLists.txt
* for CMake < 3.0 --build has no color output
Fixes#1447. `CMAKE_MODULE_PATH` is meant to be a list of directories,
and as such, is not the proper way to launch our scripts. Let's use
`${PROJECT_SOURCE_DIR}/cmake` instead. Also, let's not outright set
`CMAKE_MODULE_PATH`, but instead append our location to the list.
Commit a1d411f9c9 just assumes that gcc
will support the `-Og` option, but gcc that comes with Ubuntu 12.04 does
not. Let's check to see if the flag is supported, and then decide
whether to enable it or not.
Unfortunately, we can't force the specific inclusion of a header file.
So if anything add /opt/local/include to the include path--such as
libintl--then other dependencies might be drawn from /opt/local at
compile time, even though we detected them elsewhere at configure time.
This, in turn, causes issues with mixed versions, such as the iconv.h
header being pulled from /opt/local/include, but linked against the
library in /usr/lib--which can be mismatched versions.
So, despite CMake's best effort to treat /sw and /opt/local as just
another system area, we really need to give them preferential treatment.
To do this, we add them to CMAKE_PREFIX_PATH.
This fixes an issue discovered while re-enabling iconv in #1370.
The -O3 optimization level can often lead to dangerous (and sometimes
incorrect) optimizations being performed. So let's use a level that's
more stable.
If you aren't just building everything into build/, then the functional
tests fail because they can't find the nvim executable. Let's pass in
the location of the nvim executable, and set NVIM_PRG environment
variable accordingly.
Remove build warning:
The target name "test" is reserved or not valid for certain CMake
features, such as generator expressions, and may result in undefined
behavior.