public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* Kawa maven plugin
@ 2020-11-07 15:09 Arvydas Silanskas
  2020-11-07 21:39 ` Duncan Mak
  0 siblings, 1 reply; 6+ messages in thread
From: Arvydas Silanskas @ 2020-11-07 15:09 UTC (permalink / raw)
  To: kawa mailing list

Good evening,

I'd like to share a maven plugin I've been working on lately
https://github.com/arvyy/kawa-maven-plugin/ (examples on how it can be used
can be seen https://github.com/arvyy/kawa-maven-plugin-example/). The main
premise for using maven (with this plugin), is the automatic dependency
(including kawa runtime) gathering. I hope some of you find this useful.

Arvydas

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

* Re: Kawa maven plugin
  2020-11-07 15:09 Kawa maven plugin Arvydas Silanskas
@ 2020-11-07 21:39 ` Duncan Mak
  2020-11-21  3:38   ` Duncan Mak
  0 siblings, 1 reply; 6+ messages in thread
From: Duncan Mak @ 2020-11-07 21:39 UTC (permalink / raw)
  To: Arvydas Silanskas; +Cc: kawa mailing list

Very cool work! I'm interested in using it in my personal project.

It'd be interesting to see if this can be the basis for something like
https://clojure.org/guides/deps_and_cli for Kawa.

On Sat, Nov 7, 2020 at 10:09 AM Arvydas Silanskas via Kawa <
kawa@sourceware.org> wrote:

> Good evening,
>
> I'd like to share a maven plugin I've been working on lately
> https://github.com/arvyy/kawa-maven-plugin/ (examples on how it can be
> used
> can be seen https://github.com/arvyy/kawa-maven-plugin-example/). The main
> premise for using maven (with this plugin), is the automatic dependency
> (including kawa runtime) gathering. I hope some of you find this useful.
>
> Arvydas
>


-- 
Duncan.

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

* Re: Kawa maven plugin
  2020-11-07 21:39 ` Duncan Mak
@ 2020-11-21  3:38   ` Duncan Mak
  2020-11-21  4:46     ` Duncan Mak
  2020-11-21  8:53     ` Arvydas Silanskas
  0 siblings, 2 replies; 6+ messages in thread
From: Duncan Mak @ 2020-11-21  3:38 UTC (permalink / raw)
  To: Arvydas Silanskas; +Cc: kawa mailing list

Hello Arvydas,

I wanted to give your maven plugin a try, so I took the pom.xml from
Gluon's HelloFX and tried to make it work with Kawa sources instead of Java.

https://github.com/duncanmak/kawa-javafx-graalvm

I wonder what I'm doing wrong in my pom.xml -

mvn kawa:run works, and mvn compile claims it succeeded, but I don't see
any class files in the target output directory, in fact, it's empty.

hangul:kawa-javafx-graalvm (main) % mvn compile

[*INFO*] Scanning for projects...

[*INFO*]

[*INFO*] *--------------< *com.github.duncanmak:kawa-javafx-graalvm*
>--------------*

[*INFO*] *Building HelloFXFromKawa 1.0.0-SNAPSHOT*

[*INFO*] *--------------------------------[ jar
]---------------------------------*

[*INFO*]

[*INFO*] *--- *maven-resources-plugin:2.6:resources *(default-resources)* @
kawa-javafx-graalvm* ---*

[*INFO*] Using 'UTF-8' encoding to copy filtered resources.

[*INFO*] skip non existing resourceDirectory
/Users/duncan/git/duncanmak/kawa-javafx-graalvm/src/main/resources

[*INFO*]

[*INFO*] *--- *maven-compiler-plugin:3.8.1:compile *(default-compile)* @
kawa-javafx-graalvm* ---*

[*INFO*] No sources to compile

[*INFO*]

[*INFO*] *--- *kawa-maven-plugin:0.0.5:compile *(compile)* @
kawa-javafx-graalvm* ---*

(compiling
/Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm
to javafx-app)

/Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm:11:10:
no use of hello-world

/Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm:13:10:
no use of start

[*INFO*]
*------------------------------------------------------------------------*

[*INFO*] *BUILD SUCCESS*

[*INFO*]
*------------------------------------------------------------------------*

[*INFO*] Total time:  2.948 s

[*INFO*] Finished at: 2020-11-20T22:36:08-05:00

[*INFO*]
*------------------------------------------------------------------------*

I wonder if this has to do with the fact that Kawa doesn't seem to be
handling the main method correctly (see the warnings saying "no use of
start").

Any ideas? Per, maybe you know what's missing? I noticed that I get the
error even if I just run kawa --main -C src/main/scheme/main.scm, so it
might not have to do with the Maven plugin.

Thanks!


On Sat, Nov 7, 2020 at 4:39 PM Duncan Mak <duncanmak@gmail.com> wrote:

> Very cool work! I'm interested in using it in my personal project.
>
> It'd be interesting to see if this can be the basis for something like
> https://clojure.org/guides/deps_and_cli for Kawa.
>
> On Sat, Nov 7, 2020 at 10:09 AM Arvydas Silanskas via Kawa <
> kawa@sourceware.org> wrote:
>
>> Good evening,
>>
>> I'd like to share a maven plugin I've been working on lately
>> https://github.com/arvyy/kawa-maven-plugin/ (examples on how it can be
>> used
>> can be seen https://github.com/arvyy/kawa-maven-plugin-example/). The
>> main
>> premise for using maven (with this plugin), is the automatic dependency
>> (including kawa runtime) gathering. I hope some of you find this useful.
>>
>> Arvydas
>>
>
>
> --
> Duncan.
>


-- 
Duncan.

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

* Re: Kawa maven plugin
  2020-11-21  3:38   ` Duncan Mak
@ 2020-11-21  4:46     ` Duncan Mak
  2020-11-21  8:53     ` Arvydas Silanskas
  1 sibling, 0 replies; 6+ messages in thread
From: Duncan Mak @ 2020-11-21  4:46 UTC (permalink / raw)
  To: Arvydas Silanskas, Per Bothner; +Cc: kawa mailing list

Right after sending my mail, I was reminded of (module-compile-options
main: #t) and with a few changes, I was able to make mvn compile work.

https://github.com/duncanmak/kawa-javafx-graalvm/commit/f06d1d839aeb0a3243145fdea9b5107ddfc3e53d

The next thing I tried is to use GraalVM and see if I can generate a native
image, alas, it looks like it's not working yet.

it looks like there are methods that cannot be compiled into a native image
by GraalVM.

[Fri Nov 20 23:38:11 EST 2020][INFO] [SUB] Error:
com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke
with MethodHandle argument could not be reduced to at most a single call or
single field access. The method handle must be a compile time constant,
e.g., be loaded from a `static final` field. Method that contains the
method handle invocation: gnu.expr.CompiledProc.init(boolean, MethodHandle,
Object, int)

[Fri Nov 20 23:38:11 EST 2020][INFO] [SUB] To enable method handles that do
not require LambdaForm interpretation (e.g. because of a call to
MethodHandle.bindTo()) or to diagnose the issue, you can add the option
--report-unsupported-elements-at-runtime. The error is then reported at run
time when the invoke is executed and the method handle has to be
interpreted.

[Fri Nov 20 23:38:11 EST 2020][INFO] [SUB] Trace:

[Fri Nov 20 23:38:11 EST 2020][INFO] [SUB] at parsing
javafx-from-kawa.<clinit>(main.scm)

[Fri Nov 20 23:38:11 EST 2020][INFO] [SUB] Call path from entry point to
javafx-from-kawa.<clinit>():

[Fri Nov 20 23:38:11 EST 2020][INFO] [SUB] no path found from entry point
to target method

I see that GraalVM does work for Clojure,
https://github.com/BrunoBonacci/graalvm-clojure, I wonder what's to be done
to Kawa to make it work here.

Duncan.

On Fri, Nov 20, 2020 at 10:38 PM Duncan Mak <duncanmak@gmail.com> wrote:

> Hello Arvydas,
>
> I wanted to give your maven plugin a try, so I took the pom.xml from
> Gluon's HelloFX and tried to make it work with Kawa sources instead of Java.
>
> https://github.com/duncanmak/kawa-javafx-graalvm
>
> I wonder what I'm doing wrong in my pom.xml -
>
> mvn kawa:run works, and mvn compile claims it succeeded, but I don't see
> any class files in the target output directory, in fact, it's empty.
>
> hangul:kawa-javafx-graalvm (main) % mvn compile
>
> [*INFO*] Scanning for projects...
>
> [*INFO*]
>
> [*INFO*] *--------------< *com.github.duncanmak:kawa-javafx-graalvm*
> >--------------*
>
> [*INFO*] *Building HelloFXFromKawa 1.0.0-SNAPSHOT*
>
> [*INFO*] *--------------------------------[ jar
> ]---------------------------------*
>
> [*INFO*]
>
> [*INFO*] *--- *maven-resources-plugin:2.6:resources *(default-resources)*
> @ kawa-javafx-graalvm* ---*
>
> [*INFO*] Using 'UTF-8' encoding to copy filtered resources.
>
> [*INFO*] skip non existing resourceDirectory
> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/src/main/resources
>
> [*INFO*]
>
> [*INFO*] *--- *maven-compiler-plugin:3.8.1:compile *(default-compile)* @
> kawa-javafx-graalvm* ---*
>
> [*INFO*] No sources to compile
>
> [*INFO*]
>
> [*INFO*] *--- *kawa-maven-plugin:0.0.5:compile *(compile)* @
> kawa-javafx-graalvm* ---*
>
> (compiling
> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm
> to javafx-app)
>
> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm:11:10:
> no use of hello-world
>
> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm:13:10:
> no use of start
>
> [*INFO*]
> *------------------------------------------------------------------------*
>
> [*INFO*] *BUILD SUCCESS*
>
> [*INFO*]
> *------------------------------------------------------------------------*
>
> [*INFO*] Total time:  2.948 s
>
> [*INFO*] Finished at: 2020-11-20T22:36:08-05:00
>
> [*INFO*]
> *------------------------------------------------------------------------*
>
> I wonder if this has to do with the fact that Kawa doesn't seem to be
> handling the main method correctly (see the warnings saying "no use of
> start").
>
> Any ideas? Per, maybe you know what's missing? I noticed that I get the
> error even if I just run kawa --main -C src/main/scheme/main.scm, so it
> might not have to do with the Maven plugin.
>
> Thanks!
>
>
> On Sat, Nov 7, 2020 at 4:39 PM Duncan Mak <duncanmak@gmail.com> wrote:
>
>> Very cool work! I'm interested in using it in my personal project.
>>
>> It'd be interesting to see if this can be the basis for something like
>> https://clojure.org/guides/deps_and_cli for Kawa.
>>
>> On Sat, Nov 7, 2020 at 10:09 AM Arvydas Silanskas via Kawa <
>> kawa@sourceware.org> wrote:
>>
>>> Good evening,
>>>
>>> I'd like to share a maven plugin I've been working on lately
>>> https://github.com/arvyy/kawa-maven-plugin/ (examples on how it can be
>>> used
>>> can be seen https://github.com/arvyy/kawa-maven-plugin-example/). The
>>> main
>>> premise for using maven (with this plugin), is the automatic dependency
>>> (including kawa runtime) gathering. I hope some of you find this useful.
>>>
>>> Arvydas
>>>
>>
>>
>> --
>> Duncan.
>>
>
>
> --
> Duncan.
>


-- 
Duncan.

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

* Re: Kawa maven plugin
  2020-11-21  3:38   ` Duncan Mak
  2020-11-21  4:46     ` Duncan Mak
@ 2020-11-21  8:53     ` Arvydas Silanskas
  2020-11-21  8:56       ` Arvydas Silanskas
  1 sibling, 1 reply; 6+ messages in thread
From: Arvydas Silanskas @ 2020-11-21  8:53 UTC (permalink / raw)
  To: Duncan Mak; +Cc: kawa mailing list

Hi Duncat,

regarding your first mail, the issue seems due to sensitive defaults. All
warning options default to true, and warn-as-error is also true. Adding  to
the plugin declaration

<configuration>
    <warnUnused>false</warnUnused>
</configuration>

seems to fix it. I'm not sure why kawa emits the `unused` warning in the
first case, but not the other.

Arvydas

2020-11-21, št, 05:39 Duncan Mak <duncanmak@gmail.com> rašė:

> Hello Arvydas,
>
> I wanted to give your maven plugin a try, so I took the pom.xml from
> Gluon's HelloFX and tried to make it work with Kawa sources instead of Java.
>
> https://github.com/duncanmak/kawa-javafx-graalvm
>
> I wonder what I'm doing wrong in my pom.xml -
>
> mvn kawa:run works, and mvn compile claims it succeeded, but I don't see
> any class files in the target output directory, in fact, it's empty.
>
> hangul:kawa-javafx-graalvm (main) % mvn compile
>
> [*INFO*] Scanning for projects...
>
> [*INFO*]
>
> [*INFO*] *--------------< *com.github.duncanmak:kawa-javafx-graalvm*
> >--------------*
>
> [*INFO*] *Building HelloFXFromKawa 1.0.0-SNAPSHOT*
>
> [*INFO*] *--------------------------------[ jar
> ]---------------------------------*
>
> [*INFO*]
>
> [*INFO*] *--- *maven-resources-plugin:2.6:resources *(default-resources)*
> @ kawa-javafx-graalvm* ---*
>
> [*INFO*] Using 'UTF-8' encoding to copy filtered resources.
>
> [*INFO*] skip non existing resourceDirectory
> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/src/main/resources
>
> [*INFO*]
>
> [*INFO*] *--- *maven-compiler-plugin:3.8.1:compile *(default-compile)* @
> kawa-javafx-graalvm* ---*
>
> [*INFO*] No sources to compile
>
> [*INFO*]
>
> [*INFO*] *--- *kawa-maven-plugin:0.0.5:compile *(compile)* @
> kawa-javafx-graalvm* ---*
>
> (compiling
> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm
> to javafx-app)
>
> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm:11:10:
> no use of hello-world
>
> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm:13:10:
> no use of start
>
> [*INFO*]
> *------------------------------------------------------------------------*
>
> [*INFO*] *BUILD SUCCESS*
>
> [*INFO*]
> *------------------------------------------------------------------------*
>
> [*INFO*] Total time:  2.948 s
>
> [*INFO*] Finished at: 2020-11-20T22:36:08-05:00
>
> [*INFO*]
> *------------------------------------------------------------------------*
>
> I wonder if this has to do with the fact that Kawa doesn't seem to be
> handling the main method correctly (see the warnings saying "no use of
> start").
>
> Any ideas? Per, maybe you know what's missing? I noticed that I get the
> error even if I just run kawa --main -C src/main/scheme/main.scm, so it
> might not have to do with the Maven plugin.
>
> Thanks!
>
>
> On Sat, Nov 7, 2020 at 4:39 PM Duncan Mak <duncanmak@gmail.com> wrote:
>
>> Very cool work! I'm interested in using it in my personal project.
>>
>> It'd be interesting to see if this can be the basis for something like
>> https://clojure.org/guides/deps_and_cli for Kawa.
>>
>> On Sat, Nov 7, 2020 at 10:09 AM Arvydas Silanskas via Kawa <
>> kawa@sourceware.org> wrote:
>>
>>> Good evening,
>>>
>>> I'd like to share a maven plugin I've been working on lately
>>> https://github.com/arvyy/kawa-maven-plugin/ (examples on how it can be
>>> used
>>> can be seen https://github.com/arvyy/kawa-maven-plugin-example/). The
>>> main
>>> premise for using maven (with this plugin), is the automatic dependency
>>> (including kawa runtime) gathering. I hope some of you find this useful.
>>>
>>> Arvydas
>>>
>>
>>
>> --
>> Duncan.
>>
>
>
> --
> Duncan.
>

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

* Re: Kawa maven plugin
  2020-11-21  8:53     ` Arvydas Silanskas
@ 2020-11-21  8:56       ` Arvydas Silanskas
  0 siblings, 0 replies; 6+ messages in thread
From: Arvydas Silanskas @ 2020-11-21  8:56 UTC (permalink / raw)
  To: Duncan Mak; +Cc: kawa mailing list

I'm terribly sorry, Duncan, about misspelling of your name in my last mail.
How embarrassing.

2020-11-21, št, 10:53 Arvydas Silanskas <nma.arvydas.silanskas@gmail.com>
rašė:

> Hi Duncat,
>
> regarding your first mail, the issue seems due to sensitive defaults. All
> warning options default to true, and warn-as-error is also true. Adding  to
> the plugin declaration
>
> <configuration>
>     <warnUnused>false</warnUnused>
> </configuration>
>
> seems to fix it. I'm not sure why kawa emits the `unused` warning in the
> first case, but not the other.
>
> Arvydas
>
> 2020-11-21, št, 05:39 Duncan Mak <duncanmak@gmail.com> rašė:
>
>> Hello Arvydas,
>>
>> I wanted to give your maven plugin a try, so I took the pom.xml from
>> Gluon's HelloFX and tried to make it work with Kawa sources instead of Java.
>>
>> https://github.com/duncanmak/kawa-javafx-graalvm
>>
>> I wonder what I'm doing wrong in my pom.xml -
>>
>> mvn kawa:run works, and mvn compile claims it succeeded, but I don't see
>> any class files in the target output directory, in fact, it's empty.
>>
>> hangul:kawa-javafx-graalvm (main) % mvn compile
>>
>> [*INFO*] Scanning for projects...
>>
>> [*INFO*]
>>
>> [*INFO*] *--------------< *com.github.duncanmak:kawa-javafx-graalvm*
>> >--------------*
>>
>> [*INFO*] *Building HelloFXFromKawa 1.0.0-SNAPSHOT*
>>
>> [*INFO*] *--------------------------------[ jar
>> ]---------------------------------*
>>
>> [*INFO*]
>>
>> [*INFO*] *--- *maven-resources-plugin:2.6:resources *(default-resources)*
>> @ kawa-javafx-graalvm* ---*
>>
>> [*INFO*] Using 'UTF-8' encoding to copy filtered resources.
>>
>> [*INFO*] skip non existing resourceDirectory
>> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/src/main/resources
>>
>> [*INFO*]
>>
>> [*INFO*] *--- *maven-compiler-plugin:3.8.1:compile *(default-compile)* @
>> kawa-javafx-graalvm* ---*
>>
>> [*INFO*] No sources to compile
>>
>> [*INFO*]
>>
>> [*INFO*] *--- *kawa-maven-plugin:0.0.5:compile *(compile)* @
>> kawa-javafx-graalvm* ---*
>>
>> (compiling
>> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm
>> to javafx-app)
>>
>> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm:11:10:
>> no use of hello-world
>>
>> /Users/duncan/git/duncanmak/kawa-javafx-graalvm/./src/main/scheme/main.scm:13:10:
>> no use of start
>>
>> [*INFO*]
>> *------------------------------------------------------------------------*
>>
>> [*INFO*] *BUILD SUCCESS*
>>
>> [*INFO*]
>> *------------------------------------------------------------------------*
>>
>> [*INFO*] Total time:  2.948 s
>>
>> [*INFO*] Finished at: 2020-11-20T22:36:08-05:00
>>
>> [*INFO*]
>> *------------------------------------------------------------------------*
>>
>> I wonder if this has to do with the fact that Kawa doesn't seem to be
>> handling the main method correctly (see the warnings saying "no use of
>> start").
>>
>> Any ideas? Per, maybe you know what's missing? I noticed that I get the
>> error even if I just run kawa --main -C src/main/scheme/main.scm, so it
>> might not have to do with the Maven plugin.
>>
>> Thanks!
>>
>>
>> On Sat, Nov 7, 2020 at 4:39 PM Duncan Mak <duncanmak@gmail.com> wrote:
>>
>>> Very cool work! I'm interested in using it in my personal project.
>>>
>>> It'd be interesting to see if this can be the basis for something like
>>> https://clojure.org/guides/deps_and_cli for Kawa.
>>>
>>> On Sat, Nov 7, 2020 at 10:09 AM Arvydas Silanskas via Kawa <
>>> kawa@sourceware.org> wrote:
>>>
>>>> Good evening,
>>>>
>>>> I'd like to share a maven plugin I've been working on lately
>>>> https://github.com/arvyy/kawa-maven-plugin/ (examples on how it can be
>>>> used
>>>> can be seen https://github.com/arvyy/kawa-maven-plugin-example/). The
>>>> main
>>>> premise for using maven (with this plugin), is the automatic dependency
>>>> (including kawa runtime) gathering. I hope some of you find this useful.
>>>>
>>>> Arvydas
>>>>
>>>
>>>
>>> --
>>> Duncan.
>>>
>>
>>
>> --
>> Duncan.
>>
>

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

end of thread, other threads:[~2020-11-21  8:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07 15:09 Kawa maven plugin Arvydas Silanskas
2020-11-07 21:39 ` Duncan Mak
2020-11-21  3:38   ` Duncan Mak
2020-11-21  4:46     ` Duncan Mak
2020-11-21  8:53     ` Arvydas Silanskas
2020-11-21  8:56       ` Arvydas Silanskas

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).