Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jonathan Fischer
    @_jlfischer_twitter

    Hi all: I'm trying to build my project this morning and suddenly the elemento-core jar we've been depending on is suddenly missing from the main Maven repository.

    [ivy:resolve] :: problems summary ::
    [ivy:resolve] :::: WARNINGS
    [ivy:resolve]         [NOT FOUND  ] org.jboss.gwt.elemento#elemento-core;0.8.2-gwt2!elemento-core.gwt-lib (387ms)
    [ivy:resolve]     ==== ibiblio: tried
    [ivy:resolve]       https://repo1.maven.org/maven2/org/jboss/gwt/elemento/elemento-core/0.8.2-gwt2/elemento-core-0.8.2-gwt2.gwt-lib

    Did something happen to the older artifacts?

    Colin Alworth
    @niloc132
    looks like you are trying to get .gwt-lib instead of .jar
    a packaging=gwt-lib is a jar
    (its like how a source jar is actually a .jar, not a .sources)
    Jonathan Fischer
    @_jlfischer_twitter
    Huh, right. It's worked for the last couple of years though.
    Colin Alworth
    @niloc132
    since maven central won't delete artifacts, best guess is that something changed in your project (or elemento in a way that confuses ivy, or in ivy)
    Jonathan Fischer
    @_jlfischer_twitter
    Huh, it ended up being an Ant issue. I did a Homebrew upgrade this weekend, it pulled in the latest Ant, and suddenly I can't resolve elemento-core. Switching back to Ant 1.9.x fixed it.
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    Hi all I found out that elemento-core 1.0.1 has a dep to gwt-safehtml SNAPSHOT version... Is that a bug?
    Harald Pehl
    @hpehl
    Is there a more recent version of gwt-safehtml
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    I'm not sure... Maybe @niloc132 ?
    Colin Alworth
    @niloc132
    not yet, we're finishing up release stuff for the prereqs for safehtml
    how did maven central let you release something that depends on a snapshot?
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    Yeah that was crazy ... Never had that I feel that I'm living in NPM world 😂
    I had a small internal hackathon for micro frontends with JS... And we use GWT... I'll summarize our experiences later...
    Josh B
    @JoshIsOnIt
    Hi guys, I'm trying to migrate from 2.8 to 2.9, and when I try and compile I get errors like "Unable to find class java/lang/Enum" "Unable to resolve supertype java/lang/Object" seems like something fundamental is missing. Is there something obvious to correct this?
    Colin Alworth
    @niloc132
    probably better to ask in the main gwt room... but it sounds like your classpath is mixed up, either both gwt 2.8 and 2.9 emul, or you have some other jre emul dirtying up your classpath and confusing the compiler
    Josh B
    @JoshIsOnIt
    oh shoot! I meantto be in the gwt room!!!
    At any rate, thanks Colin, I will see if I can confirm that. I thought I had cleaned it up and removed any trace of 2.8
    Colin Alworth
    @niloc132
    any elemento users who have a bit of time to try, we have a candidate 1.0.0-RC1 release for gwt-safehtml in this staging repo: https://oss.sonatype.org/content/repositories/orggwtproject-1043
    if all looks good we'll push it to central
    Harald Pehl
    @hpehl
    @/all I've just released Elemento 1.0.2. It upgrades gwt-safehtml to 1.0.0-RC1
    See https://github.com/hal/elemento/releases/tag/1.0.2
    Rob Newton
    @rob5n
    thankyou
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    Thanks!
    Bogdan Petridean
    @bpetridean
    Thanks!
    Harald Pehl
    @hpehl
    @/all I've just released Elemento 1.0.3. The only change is that the minimal Java version is now Java 1.8. See https://github.com/hal/elemento/releases/tag/1.0.3
    This should help projects which still require Java 8, but want to upgrade to the latest Elemento version
    The new version should land in maven central soon.
    Frank Hossfeld
    @FrankHossfeld
    Perfect! Thanks!
    Tino Desjardins
    @TDesjardins
    :thumbsup:
    Harald Pehl
    @hpehl
    @/all FYI I've updated all demos of Elemento (thanks @treblereel for updating the crysknife demo). All demos compile again and are online available at https://hal.github.io/elemento/index.html
    Dmitrii Tikhomirov
    @treblereel
    @hpehl cool, thanks !
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    👍👍👍
    Daniel Korbel
    @masterdany88
    Hi. How to use this class with elemento?: https://developer.mozilla.org/en-US/docs/Web/API/URL/URL
    ?
    I cant find valid import
    Colin Alworth
    @niloc132
    @masterdany88 elemental2.dom.URL
    Rob Newton
    @rob5n
    Hi! A question about elemento templates: I have a @DataElement class field called say "user_id". And in the corresponding HTML template file I have an element with attribute 'data-element="user_ID"' so I mistakenly used the wrong case for id/ID. It appears that the elemento annotation processor at compile time doesn't flag this mismatch at compile time. But at runtime the element is not found and not bound to the java object field!? Is this known behaviour? I must confess that I am using a hacked version of elemento-template-* 0.9.6 that depends on elemento-core 1.0.2. I wonder if I have broken something in my hack.
    Colin Alworth
    @niloc132
    @rob5n not an elemento expert, but annotation processors aren't smart enough to handle changes in code, they rely on whatever is calling them to know what actually changed
    so, what is your build tool, and are you sure it is running the processor when you make any chance at all to the html template?
    Rob Newton
    @rob5n
    @niloc132 I do a clean build from maven. I can see the elemento processor compiling the templates in the compile output. If it cannot find a match it logs:
    Cannot find a matching element in AuditLogEnq.html using "[data-element=user_id]" as selector
    But I am finding that the compiler finds a case-insensitive match and compiles the template. But at runtime it comes unstuck.
    Of course I should be careful to get the cases matching in the first place, but sometimes mistakes are made and I am confused by it compiling OK but not running.
    Colin Alworth
    @niloc132
    even from a clean? that's very weird, definitely sounds like a bug in elemento's processor
    Rob Newton
    @rob5n
    From TemplatedProcessor:
        private void verifySelector(String selector, Element element, TemplateSelector templateSelector,
                org.jsoup.nodes.Element root) {
            // make sure to use the same logic for finding matching elements as in TemplateUtils!
            Elements elements = root.getElementsByAttributeValue("data-element", selector);
    Which calls the jsoup library:
        /**
         * Find elements that have an attribute with the specific value. Case insensitive.
    ...
         */
        public Elements getElementsByAttributeValue(String key, String value) {
    Colin Alworth
    @niloc132
    yep, that looks like a bug :)
    Rob Newton
    @rob5n
    So the compile checker does case insensitive.
    Rob Newton
    @rob5n
    And the generated code calls TemplateUtil.resolveElementAs(...) which calls:
    context.querySelector("[data-element=" + identifier + "]");
    which would be case sensitive .
    So yes @niloc132 it looks like a bug
    Colin Alworth
    @niloc132
    yep - gotta fix one or the other
    Rob Newton
    @rob5n
    OK, the way to use JSoup to do a case-insensitive match on attribute name and a case-sensitive match on attibute value is:
            //Elements elements = root.getElementsByAttributeValue("data-element", selector);
            Elements elements = root.getElementsByAttribute("data-element");
            long matchCount = elements.stream().filter(elem -> elem.attributes().getIgnoreCase("data-element").equals(selector)).count();
    I'll add an issue to the crysknife-io project, which is where the maintained templating code now lives, @treblereel
    Harald Pehl
    @hpehl
    Thanks @rob5n for looking into this. Looks like a bug to me. And thanks for adding an issue to crysknife.