Prepare images for Postgres 12 / PostGIS 3.0.0

This is based on https://github.com/appropriate/docker-postgis/pull/142.
proj is built with g++ and libstdc++ from edge, so the same version need
to be installed for it to work.
It compiles and runs, but I didn't test it thoroughly yet.
I'm going to try importing an OSM extract to test it.

Great to see people work on it already!  Please note that without GEOS 3.8+ there is relatively little point in upgrading to PostGIS 3.0. See https://carto.com/blog/postgis-3-release/

Works fine so far with importing and rendring volga_fed_districts using openmaptiles stack.

Beware! I was setting up Nominatim and encountered this PG12 bug, a fix for which not been merged yet: https://www.postgresql.org/message-id/flat/20191004043021.ylfbxcjqyypphfft%40alap3.anarazel.de#c11dfd761fe0bdf9fc48436cc69aff62
Keep it in mind if you're planning to move to PG12.

@eyusupov older GEOS will work, it just won't work as fast.  Also note that you may want to disable PostgreSQL JIT -- it has a bug when running complex queries, making them run 1000x times slower.  See https://www.postgresql.org/message-id/20191025010456.ubs2jdxdrb6td7m2%40alap3.anarazel.de

Not working for me.

Mac OS 10.15
Docker desktop 2.1 (engine 19)

git clone https://github.com/eyusupov/docker-postgis -b postgres-12-postgis-3 --single-branch --depth=1
cd docker-postgis/12-3
docker build .

getting this error
E: Version '3.0.0+dfsg-1.pgdg100+1' for 'postgresql-12-postgis-3' was not found
E: Version '3.0.0+dfsg-1.pgdg100+1' for 'postgresql-12-postgis-3-scripts' was not found
E: Version '3.0.0+dfsg-1.pgdg100+1' for 'postgis' was not found

Another thing to be aware of -- there is a bug in PostGIS 3.0, making holes dissappear in complex geometries (e.g. natural earth's water polygons 50m would show up without New Zealand and a few other places).  This issue has been fixed in PostGIS master.

Results from my testing:
Windows 10
Docker desktop <IP_ADDRESS> (engine 19.03.5)
docker-postgis\12-3\docker build .
..loglines...
Reverse Provides:
Reading package lists...
Building dependency tree...
Reading state information...
E: Version '3.0.0+dfsg-1.pgdg100+1' for 'postgresql-12-postgis-3' was not found
E: Version '3.0.0+dfsg-1.pgdg100+1' for 'postgresql-12-postgis-3-scripts' was not found
E: Version '3.0.0+dfsg-1.pgdg100+1' for 'postgis' was not found

docker-postgis\12-3\alpine
docker-postgis\12-3\alpine [postgres-12-postgis-3 ≡]> docker build -t tc_postgres12:alpine .
--success
docker run tc_postgres12:alpine

===========log===============
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... sh: locale: not found
2019-11-20 10:23:41.544 UTC [29] WARNING:  no usable system locales were found
ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start....2019-11-20 10:23:42.012 UTC [34] LOG:  starting PostgreSQL 12.1 on x86_64-pc-linux-musl, compiled by gcc (Alpine 8.3.0) 8.3.0, 64-bit
2019-11-20 10:23:42.015 UTC [34] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-11-20 10:23:42.034 UTC [35] LOG:  database system was shut down at 2019-11-20 10:23:41 UTC
2019-11-20 10:23:42.040 UTC [34] LOG:  database system is ready to accept connections
 done
server started

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/postgis.sh
/usr/local/bin/docker-entrypoint.sh: /docker-entrypoint-initdb.d/postgis.sh: /bin/sh^M: bad interpreter: No such file or directory

For alpine the build of the image is ok, but it fails on run (see two last loglines)
Thought this might had something to do with unix/windows file-endings. Tried therefore changing the line endings on the "postgis.sh" file from CRLF to LF, which resulted in
/docker-entrypoint-initdb.d/postgis.sh: line 13: syntax error: bad substitution
I then changed to initdb-postgis.sh to this: (which works)
#!/bin/sh

set -e

echo "testing script"

# Perform all actions as $POSTGRES_USER
export PGUSER="$POSTGRES_USER"

# Create the 'template_postgis' template db

psql --dbname="$DB" -c "CREATE DATABASE template_postgis;"
psql --dbname="$DB" -c "UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';"

# Load PostGIS into both template_database and $POSTGRES_DB
for DB in template_postgis "$POSTGRES_DB"; do
	echo "Loading PostGIS extensions into $DB"
	psql --dbname="$DB" -c "
		CREATE EXTENSION IF NOT EXISTS postgis;
		CREATE EXTENSION IF NOT EXISTS postgis_raster;
		CREATE EXTENSION IF NOT EXISTS postgis_topology;
		CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
		CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
		"

done

@torangel I don't have a windows machine to reproduce. Are you getting successful build on the master branch?

1- Confirmation
@eyusupov . Obviously the 12-3 does not exist in the master branch (if I understood your question correct), but I can confirm the same problem relies in the master branch as well for the
docker-postgis\11-2.5 [master ≡]> docker build -t testimage .
---logs---
Reading state information...
E: Version '2.5.2+dfsg-1~exp1.pgdg90+1' for 'postgresql-11-postgis-2.5' was not found
E: Version '2.5.2+dfsg-1~exp1.pgdg90+1' for 'postgresql-11-postgis-2.5-scripts' was not found
E: Version '2.5.2+dfsg-1~exp1.pgdg90+1' for 'postgis' was not found

2-Failing alpine (because of packages?`)
I have now done another try on building the 12-3 alpine image, but what previously worked just fine now failes with the following errormessage:
+ apk add --no-cache --virtual .build-deps-edge --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing --repository http://dl-cdn.alpinelinux.org/alpine/edge/main g++ gdal-dev geos-dev proj-dev protobuf-c-dev
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  gdal-dev (missing):
    required by: .build-deps-edge-20191127.182403[gdal-dev]
  geos-dev (missing):
    required by: .build-deps-edge-20191127.182403[geos-dev]
  proj-dev (missing):
    required by: .build-deps-edge-20191127.182403[proj-dev]

I notice that the build-deps-edge is build-deps-edge-20191127.171719 compared to 20191122.143637 which worked at my build-server last week
I am not deeply into the APK and gdal, but it looks to me as if something has changed in the package repository? Any advice on how to handle this is greatly appreciated.

Not working for me.
* Mac OS 10.15

* Docker desktop 2.1 (engine 19)

git clone https://github.com/eyusupov/docker-postgis -b postgres-12-postgis-3 --single-branch --depth=1
cd docker-postgis/12-3
docker build .

getting this error
E: Version '3.0.0+dfsg-1.pgdg100+1' for 'postgresql-12-postgis-3' was not found
E: Version '3.0.0+dfsg-1.pgdg100+1' for 'postgresql-12-postgis-3-scripts' was not found
E: Version '3.0.0+dfsg-1.pgdg100+1' for 'postgis' was not found

P.S. - Alpine worked fine

I work with changing value: ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg100+1
https://apt.postgresql.org/pub/repos/apt/pool/main/p/postgis/
Old package may removed.

Updated debian package version and rebased it on latest master

I can confirm @eyusupov 's change now is building succesfully on
Windows 10
Docker desktop <IP_ADDRESS> (engine 19.03.5)
12-3/alpine however still fails with the message:
+ apk add --no-cache --virtual .build-deps-edge --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing --repository http://dl-cdn.alpinelinux.org/alpine/edge/main g++ gdal-dev geos-dev proj-dev protobuf-c-dev
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  gdal-dev (missing):
    required by: .build-deps-edge-20191205.115320[gdal-dev]
  geos-dev (missing):
    required by: .build-deps-edge-20191205.115320[geos-dev]
  proj-dev (missing):
    required by: .build-deps-edge-20191205.115320[proj-dev]

I cannot find the gdal package in the edge/testing repo. I however can find it in
http://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/
When trying using this repo the build continues, but fails on cannot find /usr/bin/clang later in the build

Replaced testing repo with community and added clang dep for Alpine images

Adding gcc or clang package did not help, will investigate further

Postgres 12 image build fails with:
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2  -I../liblwgeom -std=gnu99 -g -O2 -fno-math-errno -fno-signed-zeros -I../libpgcommon -I../deps/wagyu -I../deps/uthash/include  -I/usr/include   -I/usr/include/libxml2  -I/usr/include/json-c     -fPIC -DPIC -I. -I./ -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -flto=thin -emit-llvm -c -o postgis_module.bc postgis_module.c
make[1]: /usr/bin/clang: Command not found
make[1]: *** [/usr/local/lib/postgresql/pgxs/src/makefiles/../../src/Makefile.global:1044: postgis_module.bc] Error 127
make[1]: Leaving directory '/usr/src/postgis/postgis'
make: *** [GNUmakefile:20: all] Error 1

Hey guys!  I'm in testing and trying to get a world building server running as quickly as possible.  Still trying to figure everything out though.  I am currently using a modified version below of eyusupov/postgis-osm running the latest version of everything.  Noticed you're also working on a Alpine version.  Is there a significant difference between the two?  I finally got pg12 running quickly with the git=off suggestion, so thanks for that.  Are there any other openmaptiles pieces that are being worked on for speed?  Thanks!
ARG POSTGRES_MAJOR=12
ARG POSTGIS_MAJOR=3
ARG OSML10N_VER=2.5.8

FROM postgres:${POSTGRES_MAJOR} AS builder

ARG POSTGRES_MAJOR
ARG POSTGIS_MAJOR
ARG OSML10N_VER

USER root

# Compile mapnik
RUN apt-get update \
   && apt-get install -y postgresql-server-dev-${POSTGRES_MAJOR} devscripts equivs git cmake sqlite3

ADD https://github.com/giggls/mapnik-german-l10n/archive/v${OSML10N_VER}.tar.gz /tmp/mapnik-german-l10n.tar.gz

RUN cd /tmp \
   && tar xvf mapnik-german-l10n.tar.gz \
   && cd mapnik-german-l10n-${OSML10N_VER} \
   && cat debian/control \
   && DEBIAN_FRONTEND=noninteractive mk-build-deps -ir -t "apt-get -qq --no-install-recommends" debian/control \
   && PG_SUPPORTED_VERSIONS=${POSTGRES_MAJOR} make deb

# Build gdal with PG 12 support
WORKDIR /tmp/build

RUN echo "deb-src http://deb.debian.org/debian buster main" >> /etc/apt/sources.list

RUN apt-get update && apt -y build-dep gdal-bin

RUN git clone https://github.com/OSGeo/proj.4.git /opt/proj.4
RUN cd /opt/proj.4/ && ls && ./autogen.sh && ./configure --prefix=/usr/local && make && make install
RUN git clone --single-branch --branch release/3.0 https://github.com/OSGeo/gdal.git
RUN cd gdal/gdal && ls && CXXFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --with-proj=/usr/local --without-libtool && make && make install DESTDIR=/tmp/gdal

RUN cd /tmp/ && ls

RUN mkdir /tmp/deb && \
    mv /tmp/postgresql-${POSTGRES_MAJOR}-osml10n_2.5.7_$(dpkg --print-architecture).deb \
       /tmp/deb

FROM postgres:${POSTGRES_MAJOR}

MAINTAINER "Lukas Martinelli<EMAIL_ADDRESS>
ARG POSTGRES_MAJOR
ARG POSTGIS_MAJOR
ARG OSML10N_VER=2.5.8

COPY --from=builder /tmp/deb /tmp/deb
COPY --from=builder /tmp/gdal/ /
RUN apt-get update \
   && apt-get install -y postgresql-${POSTGRES_MAJOR}-postgis-${POSTGIS_MAJOR} /tmp/deb/* \
   && rm -rf /var/lib/apt/lists/*

ENV PROJSO libproj.so.13

COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh

@eyusupov I think we wait to build new docker images includes This PR for alpine.
The current postgres image build with alpine v3.10 and llvm8 but the edge or v3.11 alpine packages and clang depends on llvm9.
Also v3.10 doesn't include gdal and some depends libraries.
I built postgres image as smellman/postgres:12-alpine and following can build docker image.
https://github.com/smellman/docker-postgis/commit/80af2955a8f1979c2d13ebcd5e06586463772668
Also I remove edge.

@smellman
I tried building from
https://github.com/smellman/docker-postgis.git
https://github.com/smellman/docker-postgis/commit/80af2955a8f1979c2d13ebcd5e06586463772668?diff=split
But was faced with this error/log
C:\kode\thirdparty\docker-postgis\12-3\alpine [(80af295...)]> docker build -t postgres .
Sending build context to Docker daemon  7.168kB
Step 1/6 : FROM postgres:12-alpine
 ---> c8abd8e13a5c
Step 2/6 : ENV POSTGIS_VERSION 3.0.0
 ---> Using cache
 ---> fc8079c8d978
Step 3/6 : ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123
 ---> Using cache
 ---> 9514af3da36e
Step 4/6 : RUN set -ex         && apk add --no-cache --virtual .fetch-deps         ca-certificates         openssl         tar         && wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/$POSTGIS_VERSION.tar.gz"     && echo "$POSTGIS_SHA256 *postgis.tar.gz" | sha256sum -c -     && mkdir -p /usr/src/postgis     && tar         --extract         --file postgis.tar.gz         --directory /usr/src/postgis         --strip-components 1     && rm postgis.tar.gz         && apk add --no-cache --virtual .build-deps         autoconf         automake         file         json-c-dev         libtool         libxml2-dev         make         perl         clang-dev         g++         gcc         gdal-dev         geos-dev         llvm9-dev         proj-dev         protobuf-c-dev     && cd /usr/src/postgis     && ./autogen.sh     && ./configure     && make     && make install     && apk add --no-cache --virtual .postgis-rundeps         json-c
    geos         gdal         proj         libstdc++         protobuf-c     && cd /     && rm -rf /usr/src/postgis     && apk del .fetch-deps .build-deps
 ---> Running in 6eb46247c6bc
+ apk add --no-cache --virtual .fetch-deps ca-certificates openssl tar
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/4) Installing ca-certificates (20190108-r0)
(2/4) Installing openssl (1.1.1d-r2)
(3/4) Installing tar (1.32-r0)
(4/4) Installing .fetch-deps (20200107.120216)
Executing busybox-1.30.1-r2.trigger
Executing ca-certificates-20190108-r0.trigger
OK: 105 MiB in 37 packages
+ wget -O postgis.tar.gz https://github.com/postgis/postgis/archive/3.0.0.tar.gz
Connecting to github.com (<IP_ADDRESS>:443)
Connecting to codeload.github.com (<IP_ADDRESS>:443)
postgis.tar.gz        10% |***                             | 1734k  0:00:08 ETA
postgis.tar.gz        52% |****************                | 8614k  0:00:01 ETA
postgis.tar.gz       100% |********************************| 15.9M  0:00:00 ETA
+ sha256sum -c -
+ echo '1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 *postgis.tar.gz'
postgis.tar.gz: OK
+ mkdir -p /usr/src/postgis
+ tar --extract --file postgis.tar.gz --directory /usr/src/postgis --strip-components 1
+ rm postgis.tar.gz
+ apk add --no-cache --virtual .build-deps autoconf automake file json-c-dev libtool libxml2-dev make perl clang-dev g++ gcc gdal-dev geos-dev llvm9-dev proj-dev protobuf-c-dev
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  gdal-dev (missing):
    required by: .build-deps-20200107.120220[gdal-dev]
  geos-dev (missing):
    required by: .build-deps-20200107.120220[geos-dev]
  llvm9-dev (missing):
    required by: .build-deps-20200107.120220[llvm9-dev]
  proj-dev (missing):
    required by: .build-deps-20200107.120220[proj-dev]
The command '/bin/sh -c set -ex         && apk add --no-cache --virtual .fetch-deps         ca-certificates         openssl         tar         && wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/$POSTGIS_VERSION.tar.gz"     && echo "$POSTGIS_SHA256 *postgis.tar.gz" | sha256sum -c -     && mkdir -p /usr/src/postgis     && tar         --extract         --file postgis.tar.gz         --directory /usr/src/postgis         --strip-components 1     && rm postgis.tar.gz         && apk add --no-cache --virtual .build-deps         autoconf         automake         file         json-c-dev         libtool         libxml2-dev
       make         perl         clang-dev         g++         gcc         gdal-dev         geos-dev         llvm9-dev         proj-dev         protobuf-c-dev     && cd /usr/src/postgis     && ./autogen.sh     && ./configure     && make     && make install     && apk add --no-cache --virtual .postgis-rundeps         json-c         geos         gdal         proj         libstdc++         protobuf-c     && cd /     && rm -rf /usr/src/postgis     && apk del .fetch-deps .build-deps' returned a non-zero code: 5

Something obvious I am doing wrong?
(Windows 10: Docker version 19.03.5, build 633a0ea)

@torangel
We need to wait upgrade postgres:12-alpine
I mentioned it.
If you want test it, let’s use smellman/postgres:12-alpine image in FROM.

I think we no longer need this PR since master branch now has postgis 2.5 and 3.0 building on postgresql 9.5 through 12.  We should close this PR and open issues and pull requests against the updated code on the master branch.  Thanks for helping with this!


[Feature]: Metafield in (Product Merchandise) CartLine

What area(s) will this request affect?
Extension
What type of change do you want to see?
Substantial change to existing feature
Overview
Hi team,
At the moment we use metafield at checkout in line_items to custom UI at checkout page , but with new checkout extension we don't have that with useCartLines.
Can the team provide it or give any some solution to resolve it?
Thank you very much
Motivation
We use metafield of product to show/hide some UI at checkout page. For now we don't know how to resolve it if we don't have.

If I understand correctly, you need to get product metafields ?
For that, you can using Storefront API to get product metafields data to show/hide UI.
More information about here: https://shopify.dev/docs/api/storefront/unstable/objects/Product

If I understand correctly, you need to get product metafields ? For that, you can using Storefront API to get product metafields data at Checkout Ui Extension to show/hide UI. More information about here: https://shopify.dev/docs/api/storefront/unstable/objects/Product

Yes, can we return it within useCartLines in CartLine interface ?

In addition to using the storefront API, you can use the "app metafields" API. With this API, you list the metafields you want as a metafields key in your shopify.extension.toml, and those metafields are queried on a number of objects in checkout, including the products and variants in cart lines. The useAppMetafields() hook lets you look these metafields up based on the results you get from the cart lines:
import {useCartLines, useAppMetafields} from '@shopify/checkout-ui-extensions-react';

function MyExtension() {
  const firstLine = useCartLines()[0];
  const variantMetafields = useAppMetafields({id: firstLine.merchandise.id});
  const productMetafields = useAppMetafields({id: firstLine.merchandise.product.id});
}

In addition to using the storefront API, you can use the "app metafields" API. With this API, you list the metafields you want as a metafields key in your shopify.extension.toml, and those metafields are queried on a number of objects in checkout, including the products and variants in cart lines. The useAppMetafields() hook lets you look these metafields up based on the results you get from the cart lines:
import {useCartLines, useAppMetafields} from '@shopify/checkout-ui-extensions-react';

function MyExtension() {
  const firstLine = useCartLines()[0];
  const variantMetafields = useAppMetafields({id: firstLine.merchandise.id});
  const productMetafields = useAppMetafields({id: firstLine.merchandise.product.id});
}

Hi thanks for the suggestion @lemonmade

Thank you all, I have managed to create a map/dictionary based on useAppMetafields with metafield key, then check it when loop over cart line item.
Hopefully we have it in CartLine like Attribute in the future.

Glad you found a solution, @hoannguyen02. In the future, we plan to support GraphQL-based "input queries" for UI extensions, like we do in Shopify Functions. When declaring data dependencies in an input query, the metafield is directly returned on the cart line's product/ variant fields, which should make this much simpler to accomplish.


Fix Field calculation when no Phase is provided.

Codecov Report
Attention: Patch coverage is 53.84615% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 75.88%. Comparing base (dadf67c) to head (ef45dcb).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4656      +/-   ##
==========================================
- Coverage   80.84%   75.88%   -4.97%
==========================================
  Files         119      118       -1
  Lines       54529    54480      -49
==========================================
- Hits        44083    41340    -2743
- Misses      10446    13140    +2694


No YAML package for Genie-0.7.0 with Julia-0.5.0

Hi, i tried to use Genie with Julia-0.5.0 on Windows8
Genie.jl-0.7.0>julia -L genie.jl --color=yes -q
Starting Genie in >> DEV << mode using 1 worker(s)
ERROR: LoadError: LoadError: LoadError: LoadError: ArgumentError: Module YAML no
t found in current path.
Run Pkg.add("YAML") to install the YAML package.
julia> Pkg.add("YAML")
ERROR: unknown package https://github.com/JuliaDB/DBI.jl required by Genie.jl-0.
7.0
Thanks in advance!

Hi, sorry - just seen this 😱
Probably too late now, but you can try the latest version, it's made good progress in terms of package setup, requirements, etc. If you have time, give it a try and let me know how it goes.
http://genieframework.com/


Release V0.3.0

#14  Switch to Multiprocessing and move helpers to utils (This PR fixed #12  #8 #7 )
#15  Rename gitignore to .gitignore ( Wow ! )
#18  Added jupyter support with ipython Audio  , sprinkled with magic 🎉
#22  Onsuccess tracks

Closed by https://github.com/Sangarshanan/jazzit/commit/609c685a7f6d1035418a7a9764e00f9bb3db663a :)


Bug when Router appears, disappears, then appears again

If I switch displaying of the top level router on or off inside my render() method--so that it first appears, then disappears, then appears again--then when it comes back, I get this error when calling any route actions: "Cannot read property 'push' of undefined" (see stack trace below).
The use case here is that I currently have a few components, e.g. full screen modals that cover the nav bar, which live outside of the top-level Router. I suppose I might be able to move these inside the Router, but this still seems like an odd bug that should be fixed.
E.g.:
  render() {
    return this.state.mode ? <SomeOtherComponent/> : (
      <View style={{flex: 1}}>
        <Router>
          <Route name="screen1" .../>
          <Route name="screen2" .../>
        </Router>
      </View>
    );
  }

Full sample code here: https://github.com/lrettig/router-onoff-bug-example

You should pass 'route' prop to children Router.

Thanks for the tip! But I only have one Router. What do you mean?

Have you tried latest npm version?

18 февр. 2016 г., в 16:36, Lane Rettig<EMAIL_ADDRESS>написал(а):
Thanks for the tip! But I only have one Router. What do you mean?
—
Reply to this email directly or view it on GitHub https://github.com/aksonov/react-native-router-flux/issues/221#issuecomment-185779056.

The simple example I put together appears to work with the latest npm version--sorry for not trying that before. But upgrading my code is producing a new warning, and I'm still getting an error in the same place. I will keep debugging, but in case either of this ring a bell for you or you have any tips.
Here's the warning (I haven't changed my code; this is new with the latest npm version, I didn't get a warning before):
Possible Unhandled Promise Rejection (id: 0):
Cannot read property 'delegate' of null
TypeError: Cannot read property 'delegate' of null
    at ExRouter.componentWillUnmount (http://localhost:8081/index.ios.bundle?platform=ios&dev=true:72287:42)
    at ReactCompositeComponentMixin.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true:15041:6)
    at Object.ReactReconciler.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true:13509:18)
    at ReactCompositeComponentMixin.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true:15044:17)
    at Object.ReactReconciler.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true:13509:18)
    at Object.ReactChildReconciler.unmountChildren (http://localhost:8081/index.ios.bundle?platform=ios&dev=true:26600:17)
    at ReactMultiChild.Mixin.unmountChildren (http://localhost:8081/index.ios.bundle?platform=ios&dev=true:26386:22)
    at ReactNativeBaseComponent.Mixin.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true:25827:6)
    at Object.ReactReconciler.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true:13509:18)
    at ReactCompositeComponentMixin.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true:15044:17)

Here's the error: "No current router is set":

My code uses tab bars and does have a hierarchy of Routers. What do I pass in the route prop to the child Router?

I was able to work around this by moving the component in question inside the top-level Router. I still think there are reasons you might sometimes want things to live outside the Router, and control their presentation via state, e.g., to easily present a modal that covers the entire screen (and leaves the view below in place), or if you want to swap a screen without any animation/transition, or if you want multiple Router hierarchies for different parts of your app, or if you simply prefer to keep state inside the state variables for part of your app.
But I may be misunderstanding these cases.
Feel free to close this if you like. Thanks again.

I've been running into this issue as well

Somehow the router is unmounted which I don't understand how it is possible

Maybe this can be useful:
Take a look at this comment. I had the same problem in nested routers and fixed it following the hints of the issue #172.

Closing for now. Some fixes was made, please check latest version


Entered Giveaways Stats - Total Points stat and rename

Is your enhancement request related to a problem? Please describe.
Not a problem but an plain enhancement of the current feature.
Describe the solution you'd like.

rename the stats according to what they are called in the settings - "Entered Giveaways Stats"
Call the additional stats "Total Points Invested" (or something along these lines) as the fourth point under the stat's title.

Describe alternatives you've considered.
A clear and concise description of any alternative solutions you've considered.
Additional Context
Rename: In the settings the feauter under 2.9 is called "Entered Giveaways Stats". The stats displayed on the entered page are called "Active Giveaways Stats" - while they should be called "Entered Giveaways Stats" according to the setting's name.
Total Points: These stats should also display the total amount of points "invested" in ongoing Giveaways on the current page/all the displayed pages when endless scrolling is enabled.

I chose to name it as "Active" because you're already on the entered page, so it wouldn't make much sense to name it "Entered". It was more of a description of the stats than an indicator of the feature. Perhaps "Active Entered Giveaways Stats"?

All features have "Where to run it on SteamGifts?", but some are limited, which is the case of this one. I actually kept the old name, as there is now an option that includes ended giveaways in the stats.


add sort for detail table column and style

add sort fucntion for start time | end time  |  intermediate result column;
表格的column自适应，padding-left and padding-right are 15px(出现滚动条时)

Default metrics becomes left align (others center align). By design?

Default metrics becomes left align (others center align). By design?

嗯


DecalGeometry Missing

This library is missing the functionality of DecalGeomety, or has any one done in there local project using this library can this be shared.

Hi @vraj129,
You can get it from here. You might need to make some changes to get it to work in your project.
Hope this helps.

Thanks @Knightro63 this worked.


MSAA in XR

Describe the feature
UI elements have lots of straight lines and suffer greatly with jaggies. In my more recent videos I have been bumping up my resolution using OpenXR toolkit (for PC) and SideQuest for Quest to try and make the UI look better, but increasing the resolution has a performance cost and I can't ask end users to use external tools to control the resolution in the released app.
There may be multiple ways to progress with this:

Add antialiasing - but I assume this in not a trivial thing.
Add resolution scaling to StereoKit so we can render higher resolution and then down sample (I would welcome this regardless of antialiasing)

I have switched to using flat 2d surfaces for my windows and buttons because I think that reduces artifacts a little. If the above 2 options require a lot of work, an alternative feature that may help me is to allow UV maps to be defined for custom meshes, I could then try fading out the hard edge of UI surfaces in my custom UI quadrant shader.
Thank you.

Yeah, I can start looking into this! Are you interested in this for Quest standalone, Quest+Link, or both? I know Quest standalone has a lamentable amount of aliasing, but desktop tends to be mostly okay. I'd be interested in your opinion on that though!
One thing is that the current UI mesh is somewhat prone to aliasing even in the best cases. The colored edges quite frequently end up at glancing angles, creating high-contrast slivers that sparkle! I've been experimenting with some edges that wrap-around the corners to prevent those slivers, but I haven't had the time to really dig into a cohesive design using it.

If you're interested in trying it out or playing around with it, the code's over here:
https://github.com/StereoKit/StereoKit/blob/develop/Examples/StereoKitTest/Tools/HolographicTheme.cs#L54

Thanks for that. I'm currently targeting Quest and PC, but basically want to get on every device I can.
While in the experience on PC, it didn't bother me too much. It's when I came to do videos (based on the PC version) that it stood out much more and that's when I started overriding the default resolution. A problem is that after release, reviewers will upload their own footage to YouTube at the default resolution and that will highlight the aliasing issues on the UI and could put people off, so for marketing purposes it's important to have the highest quality visuals I can.
I've already been adapting the Holographic theme for my flat style which has the benefit of getting rid of the depth and high contrast edges. The following is from the Quest. For buttons I have no edge but keep a 2d drop shadow. The drop shadow is prone to jaggies so it would be even better if I could reduce the transparency for just that element. Up close it does feel better, but as you go further away you notice the aliasing much more. This is from a Quest screenshot.

Also, text usually looks bad in VR when it's on a distant UI so I will probably experiment with doing a depth fade on the font to reduce that issue.

I've done some work on adding a fade around the edges of buttons and windows to reduce jaggies and to fade text at a distance. It seems to make a significant improvement. There is an overdraw overhead due to having them transparent, but performance seems OK so far.
It's worth noting that it's common practice for Quest games (and Rift) to increase the resolution to maybe 1.3 pixel density and this makes a good improvement to the general clarity of Quest software. I wonder if there is an OpenXR solution in the works for resolution scaling. Antialiasing would still be welcome when you have the opportunity :)
https://user-images.githubusercontent.com/10079865/194718867-a6fc0067-0f3a-4f9d-bd10-7c70dec82d83.mp4

Scaling the display texture seems to be pretty trivial to add, so I'll definitely be shipping that! It does make a pretty dramatic difference on Quest. I still want to resolve some thoughts about how to determine good per-platform defaults with this, but I don't think that'll prevent me from shipping the basic feature.

MSAA is proving a little more complicated. You can see it working well enough in the gif above taken in the WMR runtime, but I've found some issues I still need to explore. Might still be on my code yet, but when I ran this on the Oculus desktop runtime, enabling MSAA blanked out the right eye. Still need to get to the GL side as well.
Your button fading is pretty awesome, that does look really good like that! I've been trying to stay away from transparency to keep rendering simpler, but that is pretty tempting. I still haven't given up hope on text clarity though, I think there's still some work that can be done there to improve that :D

Wow, that was quick progress. I would recommend defaulting to the native resolution for the device (or whatever OpenXR tells you). It's then up to the developer to decide what to set as the default for each device. They know how hard they are pushing the hardware and what a suitable default should be, For PC they often allow users to change the setting in the app too.
For text clarity switching to SDFs should make a massive difference. I think the open source font library you currently use already has some code for SDF support, but I haven't looked too closely.
I'm looking forward to the render scaling so I can publish some native Quest videos :) Thanks.

This is now in v0.3.7-preview.8! I've found it to be a little unsupported by some OpenXR runtimes. I haven't determined if it's in my code or the runtime's code, but your mileage may vary. Among other things, Oculus seems to ask for the app not to use MSAA, which is a little odd, and some runtimes only display one eye. I'd consider this feature a bit of a WIP.
Render scaling should be pretty reliable though!

Thanks for those changes.
Quest 1 & 2
renderScaling works fine :)
renderMultisample is being ignored. I found the following forum post which indicates developers are just ignoring the maxSwapchainSampleCount and assume it's a bug that it returns 1. In fact, Meta do recommend that Quest apps use MSAA so can we do the same as other devs for Quest and allow it to be overridden to 2 or 4 regardless of maxSwapchainSampleCount?
(https://communityforums.atmeta.com/t5/OpenXR-Development/maxSwapchainSampleCount-is-1-on-Quest-2-No-multisample-swapchain/td-p/893389)
Rift
renderScaling distorts the screen making it unusable.
renderMultisample returns the following error and makes the screen black,
SK info] xrEndFrame [XR_ERROR_RUNTIME_FAILURE]
Thanks.

Yeah, this is something I ran into and wasn't certain what exactly to do with it! I'd prefer to obey the maxSwapchainSampleCount to keep the code portable, but yeah, I've also seen their docs where they basically insist on MSAA! (yay) So it may be time to break out some per-runtime exceptions Thanks for the thread there too, I chimed in on it as well! Would be nice to get that fixed at the source instead.
I wasn't actually sure if I should release this feature or not, given how many runtimes seem to have some amount of undefined behavior related to it! The one eye issue, or renderScaling zoom seems to happen on some platforms, but not others. I think ultimately what I'll need to do is stop relying on OpenXR for anything other than the most basic of presentation paths (whatever that may end up being), and do all of that functionality internal to StereoKit. It's a good chunk of work, so in the meantime I'd consider this a setting that you should define per-platform after testing it out. Not ideal, but I figured it'd still be helpful for you in the cases where it does work.

That's great. Thanks.
Quest is my main worry at the moment, so getting that multi-sample working will be a good win.
I'm fine with it being a "developer beware" feature and it being up to the developer to prove it works on their supported platforms and excluding it when unsure.

#703 will have code in it that should help decouple MSAA from OpenXR, and will allow for more universally controllable MSAA settings.


Add IBM Watson as a STT option

Since Google is now rate limiting API requests to 50/day and introducing a paid Cloud STT API, I modified that implementation a bit to integrate with IBM's Watson STT engine. They allow 1000 minutes/month of free transcription, which should be more than enough for most home automation use cases.

Coverage decreased (-0.7%) to 40.452% when pulling 2048c87ca3e747a79feec90d6f7f1aada9348001 on adamjreed:add_watson_stt into e6789d7475565a166117065809405eb4a21d42f4 on jasperproject:master.

Thanks for contributing. Please squash the formatting commit to keep the commit history clean.

Coverage decreased (-0.7%) to 40.452% when pulling a0617660f5d7bfbe1f5a47eb017d5e07b60866bb on adamjreed:add_watson_stt into e6789d7475565a166117065809405eb4a21d42f4 on jasperproject:master.

Sure. Rebased into one commit.

Is there any update on this?

Any idea when this will get merged?


Removing a track leaves empty directories behind

Should update deletion logic to clean up the empty directories as well.

Fixed in https://github.com/JeffreyCA/spleeter-web/pull/29