[gobject-introspection/ebassi/revert-8e85d1ca] Revert "scanner: Mark colliding properties as not introspectable"
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/ebassi/revert-8e85d1ca] Revert "scanner: Mark colliding properties as not introspectable"
- Date: Sun, 13 Feb 2022 11:56:28 +0000 (UTC)
commit 63c1cb8982b78cf329311cec3702e4cbd1f2b2b2
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Feb 13 11:54:33 2022 +0000
Revert "scanner: Mark colliding properties as not introspectable"
This reverts commit 8e85d1ca937c166f07675d02fc84abb27d06ae11.
Marking colliding properties as not introspectable breaks
a bunch of existing API when compiling the GIR into the
typelib, so we'll have to find another solution during the
grace period.
giscanner/introspectablepass.py | 3 ---
.../Regress.TestObj-name-conflict.page | 18 ++++++++++++++++++
.../Regress.TestObj-name-conflict.page | 18 ++++++++++++++++++
tests/scanner/Regress-1.0-expected.gir | 1 -
4 files changed, 36 insertions(+), 4 deletions(-)
---
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py
index 419c3d7e..1a576900 100644
--- a/giscanner/introspectablepass.py
+++ b/giscanner/introspectablepass.py
@@ -307,7 +307,6 @@ class IntrospectablePass(object):
continue
if s.name.replace('-', '_') == prop.name.replace('-', '_'):
self._property_warning(obj, prop, "Properties cannot have the same name as signals")
- prop.introspectable = False
return False
def _property_method_collision(self, obj, prop):
@@ -316,7 +315,6 @@ class IntrospectablePass(object):
continue
if m.name == prop.name.replace('-', '_'):
self._property_warning(obj, prop, "Properties cannot have the same name as methods")
- prop.introspectable = False
return False
def _property_vfunc_collision(self, obj, prop):
@@ -325,7 +323,6 @@ class IntrospectablePass(object):
continue
if vfunc.name == prop.name.replace('-', '_'):
self._property_warning(obj, prop, "Properties cannot have the same name as virtual methods")
- prop.introspectable = False
return False
def _introspectable_symbol_collisions(self, obj, stack):
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj-name-conflict.page
b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj-name-conflict.page
new file mode 100644
index 00000000..165ea2fe
--- /dev/null
+++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj-name-conflict.page
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj-name-conflict"
+ type="topic"
+ style="property"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="Regress.TestObj" group="property" type="guide"/>
+ <title type="link" role="topic">name-conflict</title>
+ </info>
+ <title>Regress.TestObj.name_conflict</title>
+ <synopsis><code mime="text/x-gjs">
+TestObj.name_conflict: Number(gint) (Read / Write / Construct)
+ </code></synopsis>
+
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-name-conflict.page
b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-name-conflict.page
new file mode 100644
index 00000000..6d02a57c
--- /dev/null
+++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-name-conflict.page
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj-name-conflict"
+ type="topic"
+ style="property"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="Regress.TestObj" group="property" type="guide"/>
+ <title type="link" role="topic">name-conflict</title>
+ </info>
+ <title>Regress.TestObj:name-conflict</title>
+ <synopsis><code mime="text/x-python">
+"name-conflict" int : Read / Write / Construct
+ </code></synopsis>
+
+
+</page>
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 2374eb8e..99d68271 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -4885,7 +4885,6 @@ raise an error.</doc>
</type>
</property>
<property name="name-conflict"
- introspectable="0"
writable="1"
construct="1"
transfer-ownership="none">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]