emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Ada/SPARK support in Babel
@ 2021-12-01  8:02 Francesc Rocher
  2023-12-17 14:17 ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Francesc Rocher @ 2021-12-01  8:02 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi all,

I've started developing Babel support for Ada and SPARK languages.
I would like to include them in the main org-mode repository, as an
additional ("officially") supported language by org-mode.

Temporary development can be found at
https://github.com/rocher/ob-ada-spark/

For a new language to be included in the main org-mode repository, it
is required that the language:

  1. is supported by Emacs
  2. has a large user-base

IMMO both requirements are satisfied:

  1. ada-mode supports Ada (and, partially, SPARK)
  2. Ada appears in position 32 in the TIOBE rank of programming
     languages popularity (https://www.tiobe.com/tiobe-index/), above
     other languages supported by Babel like Julia, Clojure, Haskell,
     Scheme, awk, Forth, Ocaml or sed. (SPARK appears in the next 100)

Do you think that Ada/SPARK support should be included in the main
org-mode repository? Or in the org-contrib one?

BR,
-- Francesc Rocher

[-- Attachment #2: Type: text/html, Size: 1350 bytes --]

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

* Re: Ada/SPARK support in Babel
  2021-12-01  8:02 Ada/SPARK support in Babel Francesc Rocher
@ 2023-12-17 14:17 ` Ihor Radchenko
  2024-02-24 13:56   ` Bastien Guerry
  0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2023-12-17 14:17 UTC (permalink / raw)
  To: Francesc Rocher, Bastien; +Cc: emacs-orgmode


[ I am going through some old threads without reply. ]

Francesc Rocher <francesc.rocher@gmail.com> writes:

> I've started developing Babel support for Ada and SPARK languages.
> I would like to include them in the main org-mode repository, as an
> additional ("officially") supported language by org-mode.
> ...
> For a new language to be included in the main org-mode repository, it 
> is required that the language:
>
>   1. is supported by Emacs
>   2. has a large user-base

> IMMO both requirements are satisfied:
>
>   1. ada-mode supports Ada (and, partially, SPARK)
>   2. Ada appears in position 32 in the TIOBE rank of programming
>      languages popularity (https://www.tiobe.com/tiobe-index/), above
>      other languages supported by Babel like Julia, Clojure, Haskell,
>      Scheme, awk, Forth, Ocaml or sed. (SPARK appears in the next 100)

From Bastien
https://list.orgmode.org/orgmode/87bl9rq29m.fsf@gnu.org/

    I suggest a criterium for keeping ob*.el files in Org could be that
    the extension is known by Emacs _or_ that the supported language is
    well-established.

Ada appears to fit in.

> Do you think that Ada/SPARK support should be included in the main
> org-mode repository? Or in the org-contrib one?

org-mode or ELPA. org-contrib is deprecated now.

I am, however, concerned that https://github.com/rocher/ob-ada-spark/
did not show much interest (just a single issue). Also, no replies on
this list from users.

It appears that we have not many Org mode users who need Ada support.

But I also know that Ada is certainly well-established and active -
https://www.adaic.org/events/.

My initial assessment is that we might include babel support for Ada if
it is accompanied by good set of tests, so that we do not need to worry
too much about things breaking even if there is no ob-ada maintainer.

... and let's see if the original author is still interested to continue
with his request.

-- 
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] 7+ messages in thread

* Re: Ada/SPARK support in Babel
  2023-12-17 14:17 ` Ihor Radchenko
@ 2024-02-24 13:56   ` Bastien Guerry
  2024-02-24 18:41     ` Francesc Rocher
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien Guerry @ 2024-02-24 13:56 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Francesc Rocher, emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> My initial assessment is that we might include babel support for Ada if
> it is accompanied by good set of tests, so that we do not need to worry
> too much about things breaking even if there is no ob-ada maintainer.
>
> ... and let's see if the original author is still interested to continue
> with his request.

FWIW +1

-- 
 Bastien Guerry


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

* Re: Ada/SPARK support in Babel
  2024-02-24 13:56   ` Bastien Guerry
@ 2024-02-24 18:41     ` Francesc Rocher
  2024-02-25 10:40       ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Francesc Rocher @ 2024-02-24 18:41 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: Ihor Radchenko, emacs-orgmode

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

Hi all,

At the moment, ob-ada-spark is available at MELPA,
https://melpa.org/#/ob-ada-spark.
For what I've seen, it seems enough for the Ada community: 187 downloads
since it was published
back in 2022 (possibly that's not relevant; possibly if it was available in
org-mode some people would
be interested in Ada).

If you still want to include it into the mainstream org-mode repository,
then I'll be more than happy
to contribute. If so, let me know what are the next steps and what kind of
test do you expect.

BR,
-- Francesc Rocher


On Sat, Feb 24, 2024 at 2:58 PM Bastien Guerry <bzg@gnu.org> wrote:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
> > My initial assessment is that we might include babel support for Ada if
> > it is accompanied by good set of tests, so that we do not need to worry
> > too much about things breaking even if there is no ob-ada maintainer.
> >
> > ... and let's see if the original author is still interested to continue
> > with his request.
>
> FWIW +1
>
> --
>  Bastien Guerry
>

[-- Attachment #2: Type: text/html, Size: 1769 bytes --]

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

* Re: Ada/SPARK support in Babel
  2024-02-24 18:41     ` Francesc Rocher
@ 2024-02-25 10:40       ` Ihor Radchenko
  2024-03-10 18:44         ` Testing issues for " Francesc Rocher
  0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2024-02-25 10:40 UTC (permalink / raw)
  To: Francesc Rocher; +Cc: Bastien Guerry, emacs-orgmode

Francesc Rocher <francesc.rocher@gmail.com> writes:

> If you still want to include it into the mainstream org-mode repository,
> then I'll be more than happy
> to contribute. If so, let me know what are the next steps and what kind of
> test do you expect.

Yes, we are interested to have Ada support in Org mode repository.

Here is what you need to do:

1. Check our contributor instructions at
   https://orgmode.org/worg/org-contribute.html#first-patch
   In particular, pay attention to the ChangeLog entry format.
   You also need FSF copyright assignment.
   Don't worry to make mistakes - we will guide you through once you
   submit patches.

2. https://github.com/rocher/ob-ada-spark/blob/main/ob-ada-spark.el
   should go to lisp/ directory of Org repository.
   Make sure to update the file header, updating the licence and stating
   that it is now a part of Emacs.

3. You need to get rid of any external library dependencies (f.el)

4. https://github.com/rocher/ob-ada-spark/blob/main/ob-doc-Ada-SPARK.org
   should go to
   https://orgmode.org/worg/org-contrib/babel/languages/index.html
   You will need to make a patch against https://git.sr.ht/~bzg/worg
   Also, make sure to follow
   https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-template.org

5. You need to add tests to testing/lisp in Org repository.
   You may use
   https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/testing/lisp/test-ob-java.el
   as a reference.

6. It will be best if you continue maintaining ob-ada within Org mode
   repository. If you are willing to, we will also give you write access
   to the Org mode repository on savannah. We will provide instructions
   later, when we reach this stage.
   Note that we use Org mailing list to track bugs and discuss the
   development. You do not have to be subscribed, we can forward
   relevant email threads to your email inbox.

If you have any questions, feel free to ask us.

-- 
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] 7+ messages in thread

* Testing issues for Ada/SPARK support in Babel
  2024-02-25 10:40       ` Ihor Radchenko
@ 2024-03-10 18:44         ` Francesc Rocher
  2024-03-12 12:00           ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Francesc Rocher @ 2024-03-10 18:44 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi all,

I'm starting from scratch the set of tests for Ada/SPARK support in Babel.
I've prepared a file with the first example:

---8<--- testing/examples/ob-ada-spark-test-org ---8<---
* Simple tests
:PROPERTIES:
:ID:       778e63c2-2644-4a6f-8e7d-f956fa3d9241
:END:
#+name: hello-world
#+begin_src ada :unit hello_world :results silent
   with Ada.Text_IO;
   procedure Hello_World is
   begin
      Ada.Text_IO.Put_Line ("Hello world");
   end Hello_World;
#+end_src
---8<------8<------8<------8<------8<------8<---

Then in the file testing/test-ob-ada-spark.el I've defined the following
test:

(ert-deftest ob-ada-spark/hello-world ()
  "Test simple Hello world."
  (org-test-at-id "778e63c2-2644-4a6f-8e7d-f956fa3d9241"
    (org-babel-next-src-block)
    (should (equal "Hello world\n" (org-babel-execute-src-block)))))

When I execute the test form within Emacs with:

(add-to-list ' load-path (concat (file-name-directory (buffer-file-name))))
(require 'org-test)
(ert 'ob-ada-spark/hello-world)

it works fine, but when I run the test from the command line with

$ make BTEST_RE='ob-ada-spark.*' test-dirty

it fails because (org-babel-execute-src-block) returns nil:

Test ob-ada-spark/hello-world condition:
    (wrong-type-argument stringp nil)
   FAILED  1/1  ob-ada-spark/hello-world (0.002933 sec) at
../lisp/test-ob-ada-spark.el:40

Everything is in place, "make compile" issues no warning and required
programs are in PATH. I've tested other languages, e.g.

$ make BTEST_RE='ob-fortran.*' test-dirty
$ make BTEST_RE='ob-java/.*' test-dirty

and everything works fine .

Any idea?? How can I debug test execution from the command line?

BR,
-- Francesc Rocher


On Sun, Feb 25, 2024 at 11:36 AM Ihor Radchenko <yantar92@posteo.net> wrote:

> Francesc Rocher <francesc.rocher@gmail.com> writes:
>
> > If you still want to include it into the mainstream org-mode repository,
> > then I'll be more than happy
> > to contribute. If so, let me know what are the next steps and what kind
> of
> > test do you expect.
>
> Yes, we are interested to have Ada support in Org mode repository.
>
> Here is what you need to do:
>
> 1. Check our contributor instructions at
>    https://orgmode.org/worg/org-contribute.html#first-patch
>    In particular, pay attention to the ChangeLog entry format.
>    You also need FSF copyright assignment.
>    Don't worry to make mistakes - we will guide you through once you
>    submit patches.
>
> 2. https://github.com/rocher/ob-ada-spark/blob/main/ob-ada-spark.el
>    should go to lisp/ directory of Org repository.
>    Make sure to update the file header, updating the licence and stating
>    that it is now a part of Emacs.
>
> 3. You need to get rid of any external library dependencies (f.el)
>
> 4. https://github.com/rocher/ob-ada-spark/blob/main/ob-doc-Ada-SPARK.org
>    should go to
>    https://orgmode.org/worg/org-contrib/babel/languages/index.html
>    You will need to make a patch against https://git.sr.ht/~bzg/worg
>    Also, make sure to follow
>
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-template.org
>
> 5. You need to add tests to testing/lisp in Org repository.
>    You may use
>
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/testing/lisp/test-ob-java.el
>    as a reference.
>
> 6. It will be best if you continue maintaining ob-ada within Org mode
>    repository. If you are willing to, we will also give you write access
>    to the Org mode repository on savannah. We will provide instructions
>    later, when we reach this stage.
>    Note that we use Org mailing list to track bugs and discuss the
>    development. You do not have to be subscribed, we can forward
>    relevant email threads to your email inbox.
>
> If you have any questions, feel free to ask us.
>
> --
> 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>
>

[-- Attachment #2: Type: text/html, Size: 6426 bytes --]

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

* Re: Testing issues for Ada/SPARK support in Babel
  2024-03-10 18:44         ` Testing issues for " Francesc Rocher
@ 2024-03-12 12:00           ` Ihor Radchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Ihor Radchenko @ 2024-03-12 12:00 UTC (permalink / raw)
  To: Francesc Rocher; +Cc: emacs-orgmode

Francesc Rocher <francesc.rocher@gmail.com> writes:

> I'm starting from scratch the set of tests for Ada/SPARK support in Babel.
> I've prepared a file with the first example:
>
> ---8<--- testing/examples/ob-ada-spark-test-org ---8<---
> ...
> Then in the file testing/test-ob-ada-spark.el I've defined the following
> test:
>
> (ert-deftest ob-ada-spark/hello-world ()
>   "Test simple Hello world."
>   (org-test-at-id "778e63c2-2644-4a6f-8e7d-f956fa3d9241"

I recommend using `org-test-with-temp-text' when the tested Org snippet
is short. Otherwise, it is harder to read the test.

> $ make BTEST_RE='ob-ada-spark.*' test-dirty
>
> it fails because (org-babel-execute-src-block) returns nil:
>
> Test ob-ada-spark/hello-world condition:
>     (wrong-type-argument stringp nil)

Is the file name exactly "ob-ada-spark-test-org"? Without .org extension?
If yes, IDs inside that file may not be indexed properly.

-- 
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] 7+ messages in thread

end of thread, other threads:[~2024-03-12 11:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01  8:02 Ada/SPARK support in Babel Francesc Rocher
2023-12-17 14:17 ` Ihor Radchenko
2024-02-24 13:56   ` Bastien Guerry
2024-02-24 18:41     ` Francesc Rocher
2024-02-25 10:40       ` Ihor Radchenko
2024-03-10 18:44         ` Testing issues for " Francesc Rocher
2024-03-12 12:00           ` 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).