Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B47DA200C5F for ; Sun, 23 Apr 2017 18:46:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B1704160BA6; Sun, 23 Apr 2017 16:46:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 03D5D160B96 for ; Sun, 23 Apr 2017 18:46:42 +0200 (CEST) Received: (qmail 20472 invoked by uid 500); 23 Apr 2017 16:46:42 -0000 Mailing-List: contact dev-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list dev@polygene.apache.org Received: (qmail 20460 invoked by uid 99); 23 Apr 2017 16:46:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Apr 2017 16:46:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7216718030D for ; Sun, 23 Apr 2017 16:46:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.48 X-Spam-Level: ** X-Spam-Status: No, score=2.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id FZZxw17bZmVl for ; Sun, 23 Apr 2017 16:46:39 +0000 (UTC) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id BF1A15FC83 for ; Sun, 23 Apr 2017 16:46:38 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id 88so63537484lfr.0 for ; Sun, 23 Apr 2017 09:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=KimpcCAlmdRLBkO2cl88QdpI0XZW95myicqOIdt3LM0=; b=R2dtiNcvHocQ8R3N2bKB56/B+XhqVIOgu4r57HOy9+8zrjo0r5bzP+9PAl1QiwTrCN yeIbRgRHs2pf0y1ZaQQXDLXHMYw+7PZ5RkbL6FRLL78a1pLENfldOzVh94iLcFWfUVUC Qc2ERaTLpyxKt62hD139WMsUShOW00G37jk2HcIRmNNx7IbxtovOKSp9lhiaUVKEIrFS z2ikBp+Rz0ZBEMk4gjQPLh71v+22RkW5e3cIHpHvU7of+vmn/hZBwveiigJzHw4fAaS4 ltjcwBRVA7V1OjuZT42g5gqMS8bWyNWiMPYf9y3xPXqZVQRVqZDXK//iGHYxSvSkl/Zr oG3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=KimpcCAlmdRLBkO2cl88QdpI0XZW95myicqOIdt3LM0=; b=FsA/OcGfAANw/5jDsSNQ5wRTg61ZgfwpkfMQW9l0Ec+Nlb3c1g2v9je7rBmfEAgdUl 1rTGGnK6fhwggg+7VpFnjDlYQhzAl8CNScgLVRPGy2wT2x7DnE/m0KYr1v3vWKk/X+6K x48a1jNuRnCeBRYx3QKB+hG6li+dRyKAuzE9aNvG6KqtLJ6Ce36boesJnr3aRM9OBVsc yUCfv+LEcg3Wgr0kOg7RXRSPgXK34AzhmqkbUrkYK4D344+70aRnnLKDTrwT0Yo368OK 6mc0ipEzATVWdId45n3M8O5A975PXZ2FM4QDXgUyGe6pvnrjq64BN3eyNumwXtTzcfha MLvA== X-Gm-Message-State: AN3rC/70W4sLFWmdgYpnqG+VBMS4RZ6MNecDxxZmZOrLdIxFG6A5okDR hyoCZqCKqwGocrzsO5GVRfGgnVYEWA== X-Received: by 10.46.7.66 with SMTP id i2mr7952732ljd.51.1492965992260; Sun, 23 Apr 2017 09:46:32 -0700 (PDT) MIME-Version: 1.0 Sender: hedhman@gmail.com Received: by 10.46.20.94 with HTTP; Sun, 23 Apr 2017 09:46:11 -0700 (PDT) In-Reply-To: References: From: Niclas Hedhman Date: Mon, 24 Apr 2017 00:46:11 +0800 X-Google-Sender-Auth: Td8xogpol9tQ3QKS1yOUoXwOY90 Message-ID: Subject: Re: :tools:generator-polygene integrated into the Gradle build To: dev@polygene.apache.org Content-Type: multipart/alternative; boundary=f403045f74b8a16c6b054dd83b2c archived-at: Sun, 23 Apr 2017 16:46:43 -0000 --f403045f74b8a16c6b054dd83b2c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I don't think it will affect the local workflow on the generator, since most the work is to look at generated code, so I have "npm link" to the source dir, and then edit, generate with model file, figure out what needs to be done next, iterate... The reason I do so much on model support is a bit conniving. Put up a web site, easier to decide what you want, entities with props/assocs, optionality, default values and so on, spit out a model.json, run it through the generator, and shoot the result to a Git(Hub) repository. Once I have figured Angular out, I intend to drape Rest applications with a Web UI, and then might as well, deploy it to a server in the same breath.... Yeah, big plans, but we have all the pieces to make this awesome with relatively little work. Cheers Niclas On Mon, Apr 24, 2017 at 12:07 AM, Paul Merlin wrote= : > Gang, > > I spent some time to integrate the project generator into the build syste= m. > > ./gradlew :tools:generator:check now runs ~40 permutations, 1m30s here > > You can also target the test task only: > > ./gradlew :tools:generator:npmTest > > A dedicated task can run all the permutations, but it takes a while: > > ./gradlew :tools:generator:npmTestAll > > Both tasks automatically installs node, npm, node dependencies and reuse > the staged maven repository with the Polygene artifacts. > The generators tests then use a Gradle init script to add that local > staged maven repository to all builds invocations. > > I changed the tests to only to ./gradlew classes instead of > ./gradlew build, this makes the tests faster. > > A JUnit compatible test report file is generated so Jenkins can take > that into account. > > The only brittle thing is putting the Polygene version into the > package.json file, which is done in-place. > I couldn=E2=80=99t find a better way for now. > > Another thing to note is that if you Ctrl-C the Gradle process then some > node processes might be hanging holding file descriptors. > It's a know issue, see https://github.com/srs/gradle- > node-plugin/issues/143, thumbs-it-up if you have a few seconds. > A `killall node` and you're good. > > Direct npm command line usage still works: > > npm run test > npm run test_all > > but you=E2=80=99ll need to invoke a Gradle task first: > > ./gradle :tools:generator:generateStageMavenRepositoryInitScript > > @Niclas: I think this is way better already despite some loose ends. > Please tell me if you think something should be done differently. > This should change a bit your workflow when working on the generator, but > for the best I hope. > No more maven local thing etc... and our CI will exercise the tests! > > (We'll get some minor failures from CI, I'm fixing theses, mostly related > to Rat=E2=84=A2 now that the project is included in the build system) > > Cheers > > /Paul > > --=20 Niclas Hedhman, Software Developer http://polygene.apache.org - New Energy for Java --f403045f74b8a16c6b054dd83b2c--