Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 21 08:27
    Kopilov closed #506
  • Nov 21 08:27
    Kopilov commented #506
  • Oct 28 07:13
    momomo commented #7454
  • Oct 28 07:12
    ShalokShalom commented #7454
  • Oct 27 23:26
    OndraZizka commented #7454
  • Sep 21 08:49
    ShalokShalom commented #7454
  • Sep 21 08:48
    ShalokShalom commented #7454
  • Sep 21 08:47
    ShalokShalom commented #7454
  • Sep 21 08:46
    ShalokShalom commented #7454
  • Sep 21 08:45
    momomo commented #7454
  • Sep 21 08:44
    ShalokShalom commented #7454
  • Sep 21 08:43
    ShalokShalom commented #7454
  • Sep 21 08:20
    luolong commented #7454
  • Sep 20 13:49
    ShalokShalom commented #7454
  • Sep 20 13:36
    momomo commented #7454
  • Sep 20 13:30
    ShalokShalom commented #7454
  • Sep 20 13:18
    momomo commented #7454
  • Sep 20 13:17
    momomo commented #7454
  • Sep 20 12:51
    ShalokShalom commented #7454
  • Sep 20 11:17
    Voiteh commented #7454
Pedro Lamarão
@pedrolamarao
Maybe this is about layout: the resources I'm trying to get in are not located in the resources root.
For example "META-INF/services/some.file"
or "some/package/hierarchy/Messages.properties"
Wojciech Potiopa
@Voiteh
I'll try to look into it tomorow
Pedro Lamarão
@pedrolamarao
I'm using Ceylon IDE as instructed by the website: downloaded a vanilla Eclipse Oxygen, then installed things via release update site
Pedro Lamarão
@pedrolamarao
I've added a new sample to the project, one that I can't make work.
Supposedly, all it requires is an import maven:com.github.jnr:"jnr-ffi" "2.1.11"; statement.
Sadly, Ceylon IDE fails, saying: "cannot find module source artifact 'maven:com.github.jnr:jnr-ffi-2.1.11' "
Wojciech Potiopa
@Voiteh
@pedrolamarao as for Your issues with resources
take close look to the docs
Suppose the following code occurs in a module named
   `com.redhat.example`:

       assert (exists resource 
          = `module`.resourceByPath("file.txt"));
       print(resource.textContent());

   Then the resource named `file.text` should be placed in 
   the subdirectory `com/redhat/example/` of the resource 
   directory.
In your resources folder You must recreate fully qualified path with the name of the module so If You have module named com.redhat.example All files (resources) which will be embed into this module must be placed in resources/com/redhat/example or other resources folder included into classpath
then You can query them like
in doc above
if You query from other module You would use metamodel call
`module your.module.name`
Wojciech Potiopa
@Voiteh
@pedrolamarao as for issues with maven this is known bug. In Ceylon module resolver there is path to maven central but starts with http which is now disabled in maven central we always get 503 but You can add another repository by providing settings.xml to the project
here is settings xml which works
And then in Your Ceylon project in IDE Your project -> properties -> ceylon build -> module repositories -> Add maven repository and from file explorer select settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
 <profiles>
    <profile>
        <id>central</id>
        <repositories>
            <repository>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>Maven Central</id>
                <name>Maven Central</name>
                <url>https://repo1.maven.org/maven2/</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
                <id>central</id>
                <url>http://repo1.maven.org/maven2</url>
            </pluginRepository>
        </pluginRepositories>
    </profile>
</profiles>

<activeProfiles>
    <activeProfile>central</activeProfile>
</activeProfiles>
</settings>
Pedro Lamarão
@pedrolamarao
@Voiteh OK, this Maven thing looks easy, I'll try it now.
Pedro Lamarão
@pedrolamarao
OK, overriding $HOME/.m2/settings.xml convinced Ceylon to import from Maven Central.
Pedro Lamarão
@pedrolamarao
@Voiteh About resources, I made changes according with your observations, with no effect.
ResourceBundlestill can't find the required resource.
This is my setup:
Ceylon IDE > Project Properties > Ceylon Build > Build Paths > Resources = ceylon-tui/src/main/resources
Inside ceylon-tui/src/main/resources there is this subtree : peu/ceylon/tui/Messages.properties
Wait, something changed since yesterday.
The .car archive now has the resources inside and in the proper place.
Pedro Lamarão
@pedrolamarao
Ah... This resources thing disappeared.
Probably my own confusion while configuring the project in Ceylon IDE.
Wojciech Potiopa
@Voiteh
happens ;)
Pedro Lamarão
@pedrolamarao
I'll proceed with a sample native binding with JNR.
Hmmmmmmmm.
Does the module import notation for maven imports allows specifying the classifier?
Pedro Lamarão
@pedrolamarao
Yes it does!
But I think this is will simply not work out of the box.
JNR native libraries are distributed in a separate artifact.
Apparently, Ceylon considers it a separate module.
Module isolation makes it not find its own resources.
Java ecosystem is not yet prepared for module isolation.
Is there a way to hack the module system so that resources inside jffi.native are exposed to jffi?
Pedro Lamarão
@pedrolamarao
One more for the day: is there a known problem importing log4j-api ?
John Vasileff
@jvasileff
@pedrolamarao Log4j2? IIRC Log4j1 worked for me, but not sure about Log4j2.
But as you've noted, the module system can cause a lot of problems when using Maven modules, since it creates unwanted isolation that the Maven modules were not designed for
This is especially a problem when your Ceylon module imports multiple Maven modules that you expect to cooperate with each other, but are instead isolated.
Ceylon is much more enjoyable to use when not attempting to use big maven frameworks with lots of dependencies
Pedro Lamarão
@pedrolamarao
I don't see a problem with dependencies.
Dependencies are fine.
But, yes, the market is still not ready for modules.
In the particular case of JNR, OSGi works because jffi.native is a fragment of jffi.
It probably doesn't work with java 9 modules (which I intend verify soon).
About log4j2, Ceylon IDE fails the maven style import saying "cannot find module source artifact etc."
John Vasileff
@jvasileff
The nice thing about Java 9 is that you can continue to use CLASSPATH for non-modularized dependencies
Pedro Lamarão
@pedrolamarao
Ceylon has no such provision, is that so?
John Vasileff
@jvasileff
There are some provisions, such as --flat-classpath. Results may vary.
Pedro Lamarão
@pedrolamarao
I'll investigate.
My objective in this case is just to demonstrate an application of jnr-ffi to define native bindings.
John Vasileff
@jvasileff

Folks, towards our goal of a 1.3.4 release that is basically 1.3.3 + fixes, I have automated development builds of the Ceylon distribution and Eclipse IDE. They are available at https://github.com/eclipse/ceylon/actions?query=workflow%3Aintegration-build.

Click on the latest successful build and download "ceylon-build-artifacts" which includes a zip file of the Ceylon distribution & IDE.

While these builds should be usable, they currently contain some unwanted new features and compatibility breaks, such as un-curried versions of fold(), etc. Over time, we will improve feature equivalence and compatibility with 1.3.3.

The current build of course includes the fix for the Maven Central URL
Pedro Lamarão
@pedrolamarao
What version of Eclipse is usable? Is it still on Photon?
John Vasileff
@jvasileff
@pedrolamarao Yes, as I understand, Photon is the latest eclipse that will work. (I responded a couple days ago, but I guess Gitter ate my message?)
Pedro Lamarão
@pedrolamarao
@jvasileff ok, thanks! I'll try it out soon.
Pedro Lamarão
@pedrolamarao
I've installed the snapshot IDE.
It fails compiling projects with import ceylon.test "1.3.3";.
There seems to be many missing dependencies: