summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorFlorian Brosch <flo.brosch@gmail.com>2014-07-10 20:35:22 +0200
committerLuca Bruno <lucabru@src.gnome.org>2016-01-30 14:45:32 +0100
commitea92f8d6b5d8d627954295e14ccec7b793facdc8 (patch)
tree6fb4a3e054672fbdfc691359a02b86dea1fca4b4 /compiler
parentbc4fc3dcd6bd5e9b266c3158a033acfa8e64ee89 (diff)
downloadvala-ea92f8d6b5d8d627954295e14ccec7b793facdc8.tar.gz
Introduce [Version (...)]
Parameters: since: string, version number experimental: bool (was: [Experimental]) experimental_until: string, version number deprecated_since: string, version number (was: [Deprecated (since="")]) replacement: string, symbol name (was: [Deprecated (replacement="")]) deprecated: bool (was: [Deprecated]) Used symbols labeled with [Version (since = "")] are checked against the locally installed package version. Use --disable-since-check to avoid this behaviour. Fixes bug 678912.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/valacompiler.vala3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala
index ee5d45b7e..ebae467aa 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -71,6 +71,7 @@ class Vala.Compiler {
static bool experimental;
static bool experimental_non_null;
static bool gobject_tracing;
+ static bool disable_since_check;
static bool disable_warnings;
static string cc_command;
[CCode (array_length = false, array_null_terminated = true)]
@@ -135,6 +136,7 @@ class Vala.Compiler {
{ "enable-experimental", 0, 0, OptionArg.NONE, ref experimental, "Enable experimental features", null },
{ "disable-warnings", 0, 0, OptionArg.NONE, ref disable_warnings, "Disable warnings", null },
{ "fatal-warnings", 0, 0, OptionArg.NONE, ref fatal_warnings, "Treat warnings as fatal", null },
+ { "disable-since-check", 0, 0, OptionArg.NONE, ref disable_since_check, "Do not check whether used symbols exist in local packages", null },
{ "enable-experimental-non-null", 0, 0, OptionArg.NONE, ref experimental_non_null, "Enable experimental enhancements for non-null types", null },
{ "enable-gobject-tracing", 0, 0, OptionArg.NONE, ref gobject_tracing, "Enable GObject creation tracing", null },
{ "cc", 0, 0, OptionArg.STRING, ref cc_command, "Use COMMAND as C compiler command", "COMMAND" },
@@ -198,6 +200,7 @@ class Vala.Compiler {
context.assert = !disable_assert;
context.checking = enable_checking;
context.deprecated = deprecated;
+ context.since_check = !disable_since_check;
context.hide_internal = hide_internal;
context.experimental = experimental;
context.experimental_non_null = experimental_non_null;