🔧 Deactivate validation temporarily

This commit is contained in:
Andrés Moya
2025-09-16 10:57:02 +02:00
committed by Andrés Moya
parent 9311ee4c87
commit a264f84e6c

View File

@@ -329,19 +329,19 @@
"This shape has children with the same swap slot" "This shape has children with the same swap slot"
shape file page))) shape file page)))
(defn- check-valid-touched #_(defn- check-valid-touched
"Validate that the text touched flags are coherent." "Validate that the text touched flags are coherent."
[shape file page] [shape file page]
(let [touched-groups (ctk/normal-touched-groups shape) (let [touched-groups (ctk/normal-touched-groups shape)
content-touched? (touched-groups :content-group) content-touched? (touched-groups :content-group)
text-touched? (or (touched-groups :text-content-text) text-touched? (or (touched-groups :text-content-text)
(touched-groups :text-content-attribute) (touched-groups :text-content-attribute)
(touched-groups :text-content-structure))] (touched-groups :text-content-structure))]
;; For now we only check this combination, that has been reported in some bugs ;; For now we only check this combination, that has been reported in some bugs
(when (and text-touched? (not content-touched?)) (when (and text-touched? (not content-touched?))
(report-error :invalid-text-touched (report-error :invalid-text-touched
"This thape has text type touched but not content touched" "This thape has text type touched but not content touched"
shape file page)))) shape file page))))
(defn- check-shape-main-root-top (defn- check-shape-main-root-top
"Root shape of a top main instance: "Root shape of a top main instance:
@@ -384,7 +384,7 @@
(check-component-ref shape file page libraries) (check-component-ref shape file page libraries)
(check-empty-swap-slot shape file page) (check-empty-swap-slot shape file page)
(check-duplicate-swap-slot shape file page) (check-duplicate-swap-slot shape file page)
(check-valid-touched shape file page) #_(check-valid-touched shape file page) ;; TODO: activate this again after we add a migration that repairs files automatically
(run! #(check-shape % file page libraries :context :copy-top :library-exists library-exists) (:shapes shape)))) (run! #(check-shape % file page libraries :context :copy-top :library-exists library-exists) (:shapes shape))))
(defn- check-shape-copy-root-nested (defn- check-shape-copy-root-nested
@@ -395,7 +395,7 @@
[shape file page libraries library-exists] [shape file page libraries library-exists]
(check-component-not-main-head shape file page libraries) (check-component-not-main-head shape file page libraries)
(check-component-not-root shape file page) (check-component-not-root shape file page)
(check-valid-touched shape file page) #_(check-valid-touched shape file page)
;; We can have situations where the nested copy and the ancestor copy come from different libraries and some of them have been dettached ;; We can have situations where the nested copy and the ancestor copy come from different libraries and some of them have been dettached
;; so we only validate the shape-ref if the ancestor is from a valid library ;; so we only validate the shape-ref if the ancestor is from a valid library
(when library-exists (when library-exists
@@ -418,7 +418,7 @@
(check-component-not-root shape file page) (check-component-not-root shape file page)
(check-component-ref shape file page libraries) (check-component-ref shape file page libraries)
(check-empty-swap-slot shape file page) (check-empty-swap-slot shape file page)
(check-valid-touched shape file page) #_(check-valid-touched shape file page)
(run! #(check-shape % file page libraries :context :copy-any) (:shapes shape))) (run! #(check-shape % file page libraries :context :copy-any) (:shapes shape)))
(defn- check-shape-not-component (defn- check-shape-not-component