branch: externals/phpinspect
commit eccb846366c369830d9e36ab2833732829784265
Author: Hugo Thunnissen <de...@hugot.nl>
Commit: Hugo Thunnissen <de...@hugot.nl>

    Remove changeset
---
 phpinspect-bmap.el          |  2 --
 phpinspect-changeset.el     | 79 ---------------------------------------------
 phpinspect-parse-context.el |  1 -
 test/phpinspect-test.el     |  1 -
 test/test-changeset.el      | 68 --------------------------------------
 5 files changed, 151 deletions(-)

diff --git a/phpinspect-bmap.el b/phpinspect-bmap.el
index d29ef1058e..281345df27 100644
--- a/phpinspect-bmap.el
+++ b/phpinspect-bmap.el
@@ -31,7 +31,6 @@
 
 (require 'phpinspect-splayt)
 (require 'phpinspect-meta)
-(require 'phpinspect-changeset)
 (require 'phpinspect-parse-context)
 (require 'phpinspect-util)
 (require 'compat)
@@ -59,7 +58,6 @@ Useful for testing or debugging.")
   (defvar phpinspect-parse-context nil
     "dummy for compilation")
 
-  (declare-function phpinspect-pctx-register-changeset 
"phpinspect-parse-context" (pctx changeset))
 
   (phpinspect--declare-log-group 'bmap))
 
diff --git a/phpinspect-changeset.el b/phpinspect-changeset.el
deleted file mode 100644
index f75b41bf94..0000000000
--- a/phpinspect-changeset.el
+++ /dev/null
@@ -1,79 +0,0 @@
-;;; phpinspect-changeset.el --- Metadata changeset module  -*- 
lexical-binding: t; -*-
-
-;; Copyright (C) 2021-2023  Free Software Foundation, Inc
-
-;; Author: Hugo Thunnissen <de...@hugot.nl>
-;; Keywords: php, languages, tools, convenience
-;; Version: 2.1.0
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;;; Code:
-
-(eval-when-compile
-  (require 'phpinspect-meta))
-
-(require 'phpinspect-splayt)
-
-(define-inline phpinspect-make-changeset (meta)
-  (inline-letevals (meta)
-    (inline-quote
-     (list (phpinspect-meta-start ,meta) (phpinspect-meta-end ,meta)
-           (phpinspect-meta-parent ,meta)
-           (phpinspect-meta-parent-offset ,meta) ,meta))))
-
-(define-inline phpinspect-changeset-start (set)
-  (inline-quote (car ,set)))
-
-(define-inline phpinspect-changeset-end (set)
-  (inline-quote (cadr ,set)))
-
-(define-inline phpinspect-changeset-parent (set)
-  (inline-quote (caddr ,set)))
-
-(define-inline phpinspect-changeset-parent-offset (set)
-  (inline-quote (car (cdddr ,set))))
-
-(define-inline phpinspect-changeset-meta (set)
-  (inline-quote (car (nthcdr 4 ,set))))
-
-(define-inline phpinspect-changeset-revert (changeset)
-  (inline-letevals (changeset)
-    (inline-quote
-     (progn
-
-       (setf (phpinspect-meta-absolute-start (phpinspect-changeset-meta 
,changeset))
-             (phpinspect-changeset-start ,changeset))
-       (setf (phpinspect-meta-absolute-end (phpinspect-changeset-meta 
,changeset))
-             (phpinspect-changeset-end ,changeset))
-       (setf (phpinspect-meta-parent-offset (phpinspect-changeset-meta 
,changeset))
-             (phpinspect-changeset-parent-offset ,changeset))
-
-       (let ((parent (phpinspect-changeset-parent ,changeset)))
-         (unless (eq parent
-                     (phpinspect-meta-parent
-                      (phpinspect-changeset-meta ,changeset)))
-           (setf (phpinspect-meta-parent (phpinspect-changeset-meta 
,changeset))
-                 parent)
-
-           (when parent
-             (phpinspect-splayt-insert
-              (phpinspect-meta-children parent)
-              (phpinspect-changeset-parent-offset ,changeset)
-              (phpinspect-changeset-meta ,changeset)))))))))
-
-(provide 'phpinspect-changeset)
-;;; phpinspect-changeset.el ends here
diff --git a/phpinspect-parse-context.el b/phpinspect-parse-context.el
index ebe98dba7b..fd17b81273 100644
--- a/phpinspect-parse-context.el
+++ b/phpinspect-parse-context.el
@@ -32,7 +32,6 @@
 
 (require 'phpinspect-util)
 (require 'phpinspect-meta)
-(require 'phpinspect-changeset)
 (require 'phpinspect-thread)
 
 (defvar phpinspect-parse-context nil
diff --git a/test/phpinspect-test.el b/test/phpinspect-test.el
index 440089456f..7bc10aaa9d 100644
--- a/test/phpinspect-test.el
+++ b/test/phpinspect-test.el
@@ -333,7 +333,6 @@ class FlufferUpper
 (load-file (concat phpinspect-test-directory "/test-splayt.el"))
 (load-file (concat phpinspect-test-directory "/test-pipeline.el"))
 (load-file (concat phpinspect-test-directory "/test-meta.el"))
-(load-file (concat phpinspect-test-directory "/test-changeset.el"))
 (load-file (concat phpinspect-test-directory "/test-resolve.el"))
 (load-file (concat phpinspect-test-directory "/test-imports.el"))
 (load-file (concat phpinspect-test-directory "/test-suggest.el"))
diff --git a/test/test-changeset.el b/test/test-changeset.el
deleted file mode 100644
index aff48206b0..0000000000
--- a/test/test-changeset.el
+++ /dev/null
@@ -1,68 +0,0 @@
-;;; test-changeset.el --- Tests for phpinspect-changeset.el  -*- 
lexical-binding: t; -*-
-
-;; Copyright (C) 2024  Hugo Thunnissen
-
-;; Author: Hugo Thunnissen <h...@libre-it.nl>
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;;
-
-;;; Code:
-
-(require 'phpinspect-test-env
-         (expand-file-name "phpinspect-test-env.el"
-                           (file-name-directory (macroexp-file-name))))
-
-(require 'phpinspect-changeset)
-(require 'phpinspect-meta)
-(require 'phpinspect-parse-context)
-
-;; (ert-deftest phpinspect-meta-with-changeset-revert-parent-relation ()
-;;   (let ((parent (phpinspect-make-meta nil 1 20 "" 'parent))
-;;         (child (phpinspect-make-meta nil 4 8 "" 'child))
-;;         (pctx (phpinspect-make-pctx))
-;;         (other-parent (phpinspect-make-meta nil 3 20 "" 'other-parent))
-;;         parent-offset)
-
-;;     (phpinspect-meta-set-parent child parent)
-;;     (setq parent-offset (phpinspect-meta-parent-offset child))
-
-
-;;     (phpinspect-with-parse-context pctx
-;;       (phpinspect-meta-with-changeset child
-;;         (phpinspect-meta-detach-parent child)
-;;         (phpinspect-meta-set-parent child other-parent)))
-
-;;     (phpinspect-changeset-revert (car (phpinspect-pctx-changesets pctx)))
-
-;;     (should (eq parent (phpinspect-meta-parent child)))
-;;     (let ((children (phpinspect-splayt-to-list
-;;                      (phpinspect-meta-children parent))))
-;;       (should (length= children 1))
-;;       (should (eq 'child (phpinspect-meta-token (car children))))
-
-;;       (should (= parent-offset (phpinspect-meta-parent-offset child)))
-;;       (should (= 4 (phpinspect-meta-start child)))
-;;       (should (= 8 (phpinspect-meta-end child)))
-;;       (should (= 4 (phpinspect-meta-width child)))
-
-;;       (should (eq child (phpinspect-splayt-find
-;;                          (phpinspect-meta-children parent)
-;;                          (phpinspect-meta-parent-offset child)))))))
-
-
-;;; test-changeset.el ends here

Reply via email to