emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] ob-java: Define the list of all supported header arguments
@ 2022-10-20 20:15 Rudolf Adamkovič
  2022-10-21  4:02 ` Ihor Radchenko
  0 siblings, 1 reply; 18+ messages in thread
From: Rudolf Adamkovič @ 2022-10-20 20:15 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 702 bytes --]

Hello smart folks!

The Org linter warns about *correct* Java source block arguments.  The
attached patch fixes that.

P.S. I originally had two regression tests, not one.  The other test
checked the '#+property:' version, e.g.

#+property: header-args:java+ :dir /tmp
#+property: header-args:java+ :classname com.example.Example
#+property: header-args:java+ :imports com.example.OtherExample
#+property: header-args:java+ :cmpflag -classpath .:/tmp/example/
#+property: header-args:java+ :cmdline -classpath .:/tmp/example/
#+property: header-args:java+ :cmdarg -verbose

However, the linter rejects these as unknown header arguments.  From
what I understand, that look like a separate issue.

Rudy


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-java-Define-the-list-of-all-supported-header-argu.patch --]
[-- Type: text/x-patch, Size: 2128 bytes --]

From 54f008cdfcf4680b3d3bc7107aa640596d5a91bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <salutis@me.com>
Date: Thu, 20 Oct 2022 21:31:37 +0200
Subject: [PATCH] ob-java: Define the list of all supported header arguments

* lisp/ob-java.el (org-babel-header-args:java): Complete the list of
header arguments supported for Java source blocks.
* testing/lisp/test-ob-java.el (ob-java/lint-header-arguments): Test
that the linter approves of all the supported arguments.
---
 lisp/ob-java.el              |  8 +++++++-
 testing/lisp/test-ob-java.el | 17 +++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-java.el b/lisp/ob-java.el
index 832214f5c..395dbd20d 100644
--- a/lisp/ob-java.el
+++ b/lisp/ob-java.el
@@ -53,7 +53,13 @@ directory, so we keep that as the default behavior.
 
 [1] https://orgmode.org/manual/Results-of-Evaluation.html")
 
-(defconst org-babel-header-args:java '((imports . :any))
+(defconst org-babel-header-args:java
+  '((dir       . :any)
+    (classname . :any)
+    (imports   . :any)
+    (cmpflag   . :any)
+    (cmdline   . :any)
+    (cmdarg    . :any))
   "Java-specific header arguments.")
 
 (defcustom org-babel-java-command "java"
diff --git a/testing/lisp/test-ob-java.el b/testing/lisp/test-ob-java.el
index 215f1cb51..a62d66557 100644
--- a/testing/lisp/test-ob-java.el
+++ b/testing/lisp/test-ob-java.el
@@ -21,9 +21,26 @@
 ;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Code:
+
 (require 'org-test "../testing/org-test")
 (require 'ob-core)
 
+;;; No Java required
+
+(ert-deftest ob-java/lint-header-arguments ()
+  (org-test-with-temp-text "
+#+header: :dir /tmp
+#+header: :classname com.example.Example
+#+header: :imports com.example.OtherExample
+#+header: :cmpflag -classpath .:/tmp/example/
+#+header: :cmdline -classpath .:/tmp/example/
+#+header: :cmdarg -verbose
+#+begin_src java
+#+end_src"
+    (should-not (org-lint '(wrong-header-argument)))))
+
+;;; Java required
+
 (org-test-for-executable "java")
 (org-test-for-executable "javac")
 (unless (featurep 'ob-java)
-- 
2.38.0


[-- Attachment #3: Type: text/plain, Size: 208 bytes --]

-- 
"The whole science is nothing more than a refinement of everyday
thinking."
-- Albert Einstein, 1879-1955

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-10-20 20:15 [PATCH] ob-java: Define the list of all supported header arguments Rudolf Adamkovič
@ 2022-10-21  4:02 ` Ihor Radchenko
  2022-10-21 12:58   ` Rudolf Adamkovič
  0 siblings, 1 reply; 18+ messages in thread
From: Ihor Radchenko @ 2022-10-21  4:02 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: emacs-orgmode

Rudolf Adamkovič <salutis@me.com> writes:

> Hello smart folks!
>
> The Org linter warns about *correct* Java source block arguments.  The
> attached patch fixes that.

Thanks!
Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=ee3dbb0fdb6e119207f13a165e90b878b741cf49

> P.S. I originally had two regression tests, not one.  The other test
> checked the '#+property:' version, e.g.
>
> #+property: header-args:java+ :dir /tmp
> #+property: header-args:java+ :classname com.example.Example
> #+property: header-args:java+ :imports com.example.OtherExample
> #+property: header-args:java+ :cmpflag -classpath .:/tmp/example/
> #+property: header-args:java+ :cmdline -classpath .:/tmp/example/
> #+property: header-args:java+ :cmdarg -verbose
>
> However, the linter rejects these as unknown header arguments.  From
> what I understand, that look like a separate issue.

Fixed.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d98a49648066ce80f1193d36accb81253a4027df

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-10-21  4:02 ` Ihor Radchenko
@ 2022-10-21 12:58   ` Rudolf Adamkovič
  2022-10-21 13:02     ` Rudolf Adamkovič
  0 siblings, 1 reply; 18+ messages in thread
From: Rudolf Adamkovič @ 2022-10-21 12:58 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

Ihor Radchenko <yantar92@posteo.net> writes:

> Thanks!
> Applied onto main.

Fantastic!

> Fixed.

Thanks.  Please see the attached patch with updated tests.

Rudy


[-- Attachment #2: 0001-test-ob-java-Test-Java-source-block-header-arguments.patch --]
[-- Type: text/x-patch, Size: 2708 bytes --]

From 5405d0419295bb1a0314cb2b3ce07713fc77e792 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <salutis@me.com>
Date: Fri, 21 Oct 2022 14:48:56 +0200
Subject: [PATCH] test-ob-java: Test Java source block header arguments at all
 levels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* testing/lisp/test-ob-java.el (ob-java/lint-header-arguments):
Renamed to ob-java/lint-header-args-block.

* testing/lisp/test-ob-java.el (ob-java/lint-header-args-heading):
Test source block header arguments at the heading level.

* testing/lisp/test-ob-java.el (ob-java/lint-header-args-buffer):
Test source block header arguments at the buffer level.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m2y1ta9rqe.fsf@me.com
---
 testing/lisp/test-ob-java.el | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/testing/lisp/test-ob-java.el b/testing/lisp/test-ob-java.el
index a62d66557..1cc7fbeb2 100644
--- a/testing/lisp/test-ob-java.el
+++ b/testing/lisp/test-ob-java.el
@@ -27,7 +27,36 @@
 
 ;;; No Java required
 
-(ert-deftest ob-java/lint-header-arguments ()
+(ert-deftest ob-java/lint-header-args-buffer ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the buffer level.
+  (org-test-with-temp-text "
+#+property: header-args:java+ :dir /tmp
+#+property: header-args:java+ :classname com.example.Example
+#+property: header-args:java+ :imports com.example.OtherExample
+#+property: header-args:java+ :cmpflag -classpath .:/tmp/example/
+#+property: header-args:java+ :cmdline -classpath .:/tmp/example/
+#+property: header-args:java+ :cmdarg -verbose"
+    (should-not (org-lint '(wrong-header-argument)))))
+
+(ert-deftest ob-java/lint-header-args-heading ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the heading level.
+  (org-test-with-temp-text "
+* Test
+:PROPERTIES:
+:header-args:java+: :dir /tmp
+:header-args:java+: :classname com.example.Example
+:header-args:java+: :imports com.example.OtherExample
+:header-args:java+: :cmpflag -classpath .:/tmp/example/
+:header-args:java+: :cmdline -classpath .:/tmp/example/
+:header-args:java+: :cmdarg -verbose
+:END:"
+    (should-not (org-lint '(wrong-header-argument)))))
+
+(ert-deftest ob-java/lint-header-args-block ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the block level.
   (org-test-with-temp-text "
 #+header: :dir /tmp
 #+header: :classname com.example.Example
-- 
2.38.0


[-- Attachment #3: Type: text/plain, Size: 191 bytes --]

-- 
"Thinking is a momentary dismissal of irrelevancies."
-- Richard Buckminster Fuller, 1969

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-10-21 12:58   ` Rudolf Adamkovič
@ 2022-10-21 13:02     ` Rudolf Adamkovič
  2022-10-21 14:00       ` Ihor Radchenko
  2022-11-08 11:50       ` Max Nikulin
  0 siblings, 2 replies; 18+ messages in thread
From: Rudolf Adamkovič @ 2022-10-21 13:02 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

Rudolf Adamkovič <salutis@me.com> writes:

> Please see the attached patch with updated tests.

Oops, I had a typo (a wrong tense) in the commit message.

Please see the patch attached to this message that has it fixed.

Rudy


[-- Attachment #2: 0001-test-ob-java-Test-Java-source-block-header-arguments.patch --]
[-- Type: text/x-patch, Size: 2707 bytes --]

From 37bd1716a652751e6941781464d47c283be3b4b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <salutis@me.com>
Date: Fri, 21 Oct 2022 14:48:56 +0200
Subject: [PATCH] test-ob-java: Test Java source block header arguments at all
 levels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* testing/lisp/test-ob-java.el (ob-java/lint-header-arguments):
Rename to ob-java/lint-header-args-block.

* testing/lisp/test-ob-java.el (ob-java/lint-header-args-heading):
Test source block header arguments at the heading level.

* testing/lisp/test-ob-java.el (ob-java/lint-header-args-buffer):
Test source block header arguments at the buffer level.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m2y1ta9rqe.fsf@me.com
---
 testing/lisp/test-ob-java.el | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/testing/lisp/test-ob-java.el b/testing/lisp/test-ob-java.el
index a62d66557..1cc7fbeb2 100644
--- a/testing/lisp/test-ob-java.el
+++ b/testing/lisp/test-ob-java.el
@@ -27,7 +27,36 @@
 
 ;;; No Java required
 
-(ert-deftest ob-java/lint-header-arguments ()
+(ert-deftest ob-java/lint-header-args-buffer ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the buffer level.
+  (org-test-with-temp-text "
+#+property: header-args:java+ :dir /tmp
+#+property: header-args:java+ :classname com.example.Example
+#+property: header-args:java+ :imports com.example.OtherExample
+#+property: header-args:java+ :cmpflag -classpath .:/tmp/example/
+#+property: header-args:java+ :cmdline -classpath .:/tmp/example/
+#+property: header-args:java+ :cmdarg -verbose"
+    (should-not (org-lint '(wrong-header-argument)))))
+
+(ert-deftest ob-java/lint-header-args-heading ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the heading level.
+  (org-test-with-temp-text "
+* Test
+:PROPERTIES:
+:header-args:java+: :dir /tmp
+:header-args:java+: :classname com.example.Example
+:header-args:java+: :imports com.example.OtherExample
+:header-args:java+: :cmpflag -classpath .:/tmp/example/
+:header-args:java+: :cmdline -classpath .:/tmp/example/
+:header-args:java+: :cmdarg -verbose
+:END:"
+    (should-not (org-lint '(wrong-header-argument)))))
+
+(ert-deftest ob-java/lint-header-args-block ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the block level.
   (org-test-with-temp-text "
 #+header: :dir /tmp
 #+header: :classname com.example.Example
-- 
2.38.0


[-- Attachment #3: Type: text/plain, Size: 178 bytes --]

-- 
"Genius is 1% inspiration and 99% perspiration."
-- Thomas Alva Edison, 1932

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-10-21 13:02     ` Rudolf Adamkovič
@ 2022-10-21 14:00       ` Ihor Radchenko
  2022-11-08 11:50       ` Max Nikulin
  1 sibling, 0 replies; 18+ messages in thread
From: Ihor Radchenko @ 2022-10-21 14:00 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: emacs-orgmode

Rudolf Adamkovič <salutis@me.com> writes:

> Rudolf Adamkovič <salutis@me.com> writes:
>
>> Please see the attached patch with updated tests.
>
> Oops, I had a typo (a wrong tense) in the commit message.
>
> Please see the patch attached to this message that has it fixed.

Thanks!
Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=bed47b437d8cde7a98bafdb07996e248b40f70e6

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-10-21 13:02     ` Rudolf Adamkovič
  2022-10-21 14:00       ` Ihor Radchenko
@ 2022-11-08 11:50       ` Max Nikulin
  2022-11-08 12:41         ` Ihor Radchenko
  2022-11-09  0:30         ` Rudolf Adamkovič
  1 sibling, 2 replies; 18+ messages in thread
From: Max Nikulin @ 2022-11-08 11:50 UTC (permalink / raw)
  To: emacs-orgmode

Am I the only person who gets

3 unexpected results:
    FAILED  ob-java/lint-header-args-block
    FAILED  ob-java/lint-header-args-buffer
    FAILED  ob-java/lint-header-args-heading

Emacs-27.1. Example of failure:

Test ob-java/lint-header-args-block backtrace:
   signal(ert-test-failed (((should-not (org-lint '(wrong-header-argume
   ert-fail(((should-not (org-lint '(wrong-header-argument))) :form (or
   (if (not (unwind-protect (setq value-602 (apply fn-600 args-601)) (s
   (let (form-description-604) (if (not (unwind-protect (setq value-602
   (let ((value-602 'ert-form-evaluation-aborted-603)) (let (form-descr
   (let* ((fn-600 #'org-lint) (args-601 (condition-case err (let ((sign
   (progn (org-mode) (let ((point (string-match "<point>" inside-text))
   (unwind-protect (progn (org-mode) (let ((point (string-match "<point
   (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
   (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-b
   (let ((inside-text (if (stringp "\n#+header: :dir /tmp\n#+header: :c
   (closure (t) nil (let ((inside-text (if (stringp "\n#+header: :dir /
   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
   ert-run-test(#s(ert-test :name ob-java/lint-header-args-block :docum
   ert-run-or-rerun-test(#s(ert--stats :selector "\\(org\\|ob\\|ox\\...
   ert-run-tests("\\(org\\|ob\\|ox\\)" #f(compiled-function (event-type
   ert-run-tests-batch("\\(org\\|ob\\|ox\\)")
   ert-run-tests-batch-and-exit("\\(org\\|ob\\|ox\\)")
   (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
   org-test-run-batch-tests("\\(org\\|ob\\|ox\\)")
   eval((org-test-run-batch-tests org-test-select-re) t)
   command-line-1(("--eval" "(setq vc-handled-backends nil org-startup-
   command-line()
   normal-top-level()
Test ob-java/lint-header-args-block condition:
     (ert-test-failed
      ((should-not
        (org-lint '...))
       :form
       (org-lint
        (wrong-header-argument))
       :value
       ((1
         ["8" "nil" "Unknown header argument \":classname\"" 
#s(org-lint-checker wrong-header-argument "Report wrong babel headers" 
org-lint-wrong-header-argument nil ...)])
        (2
         ["8" "nil" "Unknown header argument \":imports\"" 
#s(org-lint-checker wrong-header-argument "Report wrong babel headers" 
org-lint-wrong-header-argument nil ...)])
        (3
         ["8" "nil" "Unknown header argument \":cmpflag\"" 
#s(org-lint-checker wrong-header-argument "Report wrong babel headers" 
org-lint-wrong-header-argument nil ...)])
        (4
         ["8" "nil" "Unknown header argument \":cmdarg\"" 
#s(org-lint-checker wrong-header-argument "Report wrong babel headers" 
org-lint-wrong-header-argument nil ...)]))))
    FAILED   59/978  ob-java/lint-header-args-block (0.004049 sec)





^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-08 11:50       ` Max Nikulin
@ 2022-11-08 12:41         ` Ihor Radchenko
  2022-11-09  0:30         ` Rudolf Adamkovič
  1 sibling, 0 replies; 18+ messages in thread
From: Ihor Radchenko @ 2022-11-08 12:41 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

Max Nikulin <manikulin@gmail.com> writes:

> Am I the only person who gets
>
> 3 unexpected results:
>     FAILED  ob-java/lint-header-args-block
>     FAILED  ob-java/lint-header-args-buffer
>     FAILED  ob-java/lint-header-args-heading
>
> Emacs-27.1. Example of failure:

Tests are passing on my side.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-08 11:50       ` Max Nikulin
  2022-11-08 12:41         ` Ihor Radchenko
@ 2022-11-09  0:30         ` Rudolf Adamkovič
  2022-11-09  2:19           ` Ihor Radchenko
  1 sibling, 1 reply; 18+ messages in thread
From: Rudolf Adamkovič @ 2022-11-09  0:30 UTC (permalink / raw)
  To: Max Nikulin, emacs-orgmode

Max Nikulin <manikulin@gmail.com> writes:

> Am I the only person who gets
>
> 3 unexpected results:
>     FAILED  ob-java/lint-header-args-block
>     FAILED  ob-java/lint-header-args-buffer
>     FAILED  ob-java/lint-header-args-heading

On `main' with Emacs 29 (5b9b393c61), I get:

8 unexpected results:
   FAILED  ob-java/lint-header-args-block [...]
   FAILED  ob-java/lint-header-args-buffer [...]
   FAILED  ob-java/lint-header-args-heading [...]
   FAILED  test-org-num/max-level [...]
   FAILED  test-org-num/skip-numbering [...]
   FAILED  test-org-num/update [...] 
   FAILED  test-org-table/sort-lines [...]
   FAILED  test-org-table/toggle-column-width [...]

The first three tests (`ob-java') pass interactively but fail with `make
test'.  The remaining tests (`test-org-num' and `test-org-table') fail
in both scenarios.  That said, I run macOS, which has some issues with
sorting [*].

Rudy

[*] https://list.orgmode.org/m2ilkwso8r.fsf@me.com/
-- 
"The introduction of suitable abstractions is our only mental aid to
organize and master complexity."
-- Edsger Wybe Dijkstra, 1930-2002

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-09  0:30         ` Rudolf Adamkovič
@ 2022-11-09  2:19           ` Ihor Radchenko
  2022-11-10  0:05             ` Rudolf Adamkovič
  0 siblings, 1 reply; 18+ messages in thread
From: Ihor Radchenko @ 2022-11-09  2:19 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: Max Nikulin, emacs-orgmode

Rudolf Adamkovič <salutis@me.com> writes:

> On `main' with Emacs 29 (5b9b393c61), I get:
>
> 8 unexpected results:
> ...
>    FAILED  test-org-num/max-level [...]
>    FAILED  test-org-num/skip-numbering [...]
>    FAILED  test-org-num/update [...] 
>    FAILED  test-org-table/sort-lines [...]
>    FAILED  test-org-table/toggle-column-width [...]
> ...  The remaining tests (`test-org-num' and `test-org-table') fail
> in both scenarios.  That said, I run macOS, which has some issues with
> sorting [*].

This is not because of macOS. Emacs 29 broke some assumptions about
return value of `overlays-in'. See
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59067

Now fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5a6d00a3a343d64acbc34fb0c35da754f52d172c

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-09  2:19           ` Ihor Radchenko
@ 2022-11-10  0:05             ` Rudolf Adamkovič
  2022-11-10  2:12               ` Ihor Radchenko
  0 siblings, 1 reply; 18+ messages in thread
From: Rudolf Adamkovič @ 2022-11-10  0:05 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Max Nikulin, emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

>> ...  The remaining tests (`test-org-num' and `test-org-table') fail
>> in both scenarios.  That said, I run macOS, which has some issues with
>> sorting [*].
>
> This is not because of macOS. Emacs 29 broke some assumptions about
> return value of `overlays-in'. See
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59067

The second one (`test-org-table') still fails on macOS.

Overall, I now see the following failures on the main branch:

   FAILED  ob-java/lint-header-args-block
   FAILED  ob-java/lint-header-args-buffer
   FAILED  ob-java/lint-header-args-heading
   FAILED  test-org-table/sort-lines

Rudy
-- 
"Thinking is a momentary dismissal of irrelevancies."
-- Richard Buckminster Fuller, 1969

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-10  0:05             ` Rudolf Adamkovič
@ 2022-11-10  2:12               ` Ihor Radchenko
  2022-11-10  8:26                 ` Bruno Barbier
  2022-11-11 23:13                 ` Rudolf Adamkovič
  0 siblings, 2 replies; 18+ messages in thread
From: Ihor Radchenko @ 2022-11-10  2:12 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: Max Nikulin, emacs-orgmode

Rudolf Adamkovič <salutis@me.com> writes:

> The second one (`test-org-table') still fails on macOS.
>
> Overall, I now see the following failures on the main branch:
>
>    FAILED  ob-java/lint-header-args-block
>    FAILED  ob-java/lint-header-args-buffer
>    FAILED  ob-java/lint-header-args-heading

AFAIK, Max is using Linux. This is strange...
And I cannot really fix it without being able to reproduce on my side.

>    FAILED  test-org-table/sort-lines

Could you narrow down the particular test condition which is failing?
Is it similar to previously discussed cases where MacOS sorting is not
consistent with Linux?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-10  2:12               ` Ihor Radchenko
@ 2022-11-10  8:26                 ` Bruno Barbier
  2022-11-10  8:59                   ` Ihor Radchenko
  2022-11-11 23:13                 ` Rudolf Adamkovič
  1 sibling, 1 reply; 18+ messages in thread
From: Bruno Barbier @ 2022-11-10  8:26 UTC (permalink / raw)
  To: Ihor Radchenko, Rudolf Adamkovič; +Cc: Max Nikulin, emacs-orgmode



Ihor Radchenko <yantar92@posteo.net> writes:

> Rudolf Adamkovič <salutis@me.com> writes:
>
>> Overall, I now see the following failures on the main branch:
>>
>>    FAILED  ob-java/lint-header-args-block
>>    FAILED  ob-java/lint-header-args-buffer
>>    FAILED  ob-java/lint-header-args-heading
>
> AFAIK, Max is using Linux. This is strange...
> And I cannot really fix it without being able to reproduce on my side.

I'm seeing these 3 failures too, running the tests from the command
line. The failure looks like this:

    FAILED ob-java/lint-header-args-block ((should-not (org-lint
    '(wrong-header-argument))) :form (org-lint (wrong-header-argument))
    :value ((1 ["8" "nil" "Unknown header argument \":classname\""
    #s(org-lint-checker wrong-header-argument "Report wrong babel
    headers" org-lint-wrong-header-argument nil (babel))]) (2 ["8" "nil"
    "Unknown header argument \":imports\"" #s(org-lint-checker
    wrong-header-argument "Report wrong babel headers"
    org-lint-wrong-header-argument nil (babel))]) (3 ["8" "nil" "Unknown
    header argument \":cmpflag\"" #s(org-lint-checker
    wrong-header-argument "Report wrong babel headers"
    org-lint-wrong-header-argument nil (babel))]) (4 ["8" "nil" "Unknown
    header argument \":cmdarg\"" #s(org-lint-checker
    wrong-header-argument "Report wrong babel headers"
    org-lint-wrong-header-argument nil (babel))])))


Adding (require 'ob-java) at the beginning of test-ob-java.el ensures
that `org-babel-header-args:java' is defined, and the tests pass.

Bruno


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-10  8:26                 ` Bruno Barbier
@ 2022-11-10  8:59                   ` Ihor Radchenko
  2022-11-10 19:07                     ` Bruno Barbier
  0 siblings, 1 reply; 18+ messages in thread
From: Ihor Radchenko @ 2022-11-10  8:59 UTC (permalink / raw)
  To: Bruno Barbier; +Cc: Rudolf Adamkovič, Max Nikulin, emacs-orgmode

Bruno Barbier <brubar.cs@gmail.com> writes:

> I'm seeing these 3 failures too, running the tests from the command
> line. The failure looks like this:
>
>     FAILED ob-java/lint-header-args-block ((should-not (org-lint
>     '(wrong-header-argument))) :form (org-lint (wrong-header-argument))
>     :value ((1 ["8" "nil" "Unknown header argument \":classname\""
>     #s(org-lint-checker wrong-header-argument "Report wrong babel
>     headers" org-lint-wrong-header-argument nil (babel))]) (2 ["8" "nil"
>     "Unknown header argument \":imports\"" #s(org-lint-checker
>     wrong-header-argument "Report wrong babel headers"
>     org-lint-wrong-header-argument nil (babel))]) (3 ["8" "nil" "Unknown
>     header argument \":cmpflag\"" #s(org-lint-checker
>     wrong-header-argument "Report wrong babel headers"
>     org-lint-wrong-header-argument nil (babel))]) (4 ["8" "nil" "Unknown
>     header argument \":cmdarg\"" #s(org-lint-checker
>     wrong-header-argument "Report wrong babel headers"
>     org-lint-wrong-header-argument nil (babel))])))
>
>
> Adding (require 'ob-java) at the beginning of test-ob-java.el ensures
> that `org-babel-header-args:java' is defined, and the tests pass.

Then, it sounds like local.mk does not enable java tests.

I fixed such scenario on main.
Now, java tests will be skipped when ob-java testing is not requested.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-10  8:59                   ` Ihor Radchenko
@ 2022-11-10 19:07                     ` Bruno Barbier
  0 siblings, 0 replies; 18+ messages in thread
From: Bruno Barbier @ 2022-11-10 19:07 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Rudolf Adamkovič, Max Nikulin, emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> Then, it sounds like local.mk does not enable java tests.
>
> I fixed such scenario on main.
> Now, java tests will be skipped when ob-java testing is not requested.


That works for me now, with or without java in local.mk.

Thanks for the patch and the explanation!

Bruno


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-10  2:12               ` Ihor Radchenko
  2022-11-10  8:26                 ` Bruno Barbier
@ 2022-11-11 23:13                 ` Rudolf Adamkovič
  2022-11-12 13:01                   ` Ihor Radchenko
  1 sibling, 1 reply; 18+ messages in thread
From: Rudolf Adamkovič @ 2022-11-11 23:13 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Max Nikulin, emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> Could you narrow down the particular test condition which is failing?
> Is it similar to previously discussed cases where MacOS sorting is not
> consistent with Linux?

In the linked mail, I discuss the problem starting from this test,
tracking it down to the problematic line of code.  Do you want me to
look into something further?

Rudy
-- 
"One can begin to reason only when a clear picture has been formed in
the imagination."
-- Walter Warwick Sawyer, Mathematician's Delight, 1943

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-11 23:13                 ` Rudolf Adamkovič
@ 2022-11-12 13:01                   ` Ihor Radchenko
  2022-11-12 22:05                     ` Rudolf Adamkovič
  0 siblings, 1 reply; 18+ messages in thread
From: Ihor Radchenko @ 2022-11-12 13:01 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: Max Nikulin, emacs-orgmode

Rudolf Adamkovič <salutis@me.com> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> Could you narrow down the particular test condition which is failing?
>> Is it similar to previously discussed cases where MacOS sorting is not
>> consistent with Linux?
>
> In the linked mail, I discuss the problem starting from this test,
> tracking it down to the problematic line of code.  Do you want me to
> look into something further?

Yes, ideally, we need to know which exact test case fails. But please
open a new thread as it will be unrelated to java discussed herein.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-12 13:01                   ` Ihor Radchenko
@ 2022-11-12 22:05                     ` Rudolf Adamkovič
  2022-11-13  4:41                       ` Ihor Radchenko
  0 siblings, 1 reply; 18+ messages in thread
From: Rudolf Adamkovič @ 2022-11-12 22:05 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Max Nikulin, emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

>> In the linked mail, I discuss the problem starting from this test,
>> tracking it down to the problematic line of code.  Do you want me to
>> look into something further?
>
> Yes, ideally, we need to know which exact test case fails. But please
> open a new thread as it will be unrelated to java discussed herein.

Now you lost me.  :)

The linked mail has all the information already has its own thread.

Rudy
-- 
"Simplicity is complexity resolved."
-- Constantin Brâncuși, 1876-1957

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH] ob-java: Define the list of all supported header arguments
  2022-11-12 22:05                     ` Rudolf Adamkovič
@ 2022-11-13  4:41                       ` Ihor Radchenko
  0 siblings, 0 replies; 18+ messages in thread
From: Ihor Radchenko @ 2022-11-13  4:41 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: Max Nikulin, emacs-orgmode

Rudolf Adamkovič <salutis@me.com> writes:

>> Yes, ideally, we need to know which exact test case fails. But please
>> open a new thread as it will be unrelated to java discussed herein.
>
> Now you lost me.  :)
>
> The linked mail has all the information already has its own thread.

You are right.
https://orgmode.org/list/m2ilkwso8r.fsf@me.com already reported this
exact failure.

I am not yet sure how to proceed there.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-11-13  4:41 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-20 20:15 [PATCH] ob-java: Define the list of all supported header arguments Rudolf Adamkovič
2022-10-21  4:02 ` Ihor Radchenko
2022-10-21 12:58   ` Rudolf Adamkovič
2022-10-21 13:02     ` Rudolf Adamkovič
2022-10-21 14:00       ` Ihor Radchenko
2022-11-08 11:50       ` Max Nikulin
2022-11-08 12:41         ` Ihor Radchenko
2022-11-09  0:30         ` Rudolf Adamkovič
2022-11-09  2:19           ` Ihor Radchenko
2022-11-10  0:05             ` Rudolf Adamkovič
2022-11-10  2:12               ` Ihor Radchenko
2022-11-10  8:26                 ` Bruno Barbier
2022-11-10  8:59                   ` Ihor Radchenko
2022-11-10 19:07                     ` Bruno Barbier
2022-11-11 23:13                 ` Rudolf Adamkovič
2022-11-12 13:01                   ` Ihor Radchenko
2022-11-12 22:05                     ` Rudolf Adamkovič
2022-11-13  4:41                       ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).