Blaze support

Hello,
Blaze http://blaze.pydata.org/ is very efficient when you want to connect to a database and
want to retrieve data from a very long table.
It will be nice if gtabview (and maybe tabview also) could display blaze.interactive.InteractiveSymbol (named dat here or ds sometimes)
http://blaze.pydata.org/en/latest/quickstart.html
http://blaze.pydata.org/en/latest/rosetta-pandas.html
With Blaze, you can connect to a database table using
import blaze as bz
table_uri = 'dialect+driver://user:password@host:port/databasename::tablename'
dat = bz.Data(table_uri)

it's much more efficient than
import pandas as pd
import sqlalchemy
db_uri = 'dialect+driver://user:password@host:port/databasename'
engine = sqlalchemy.create_engine(db_uri)
query = 'SELECT * FROM tablename'
df = pd.read_sql(query, con=engine)

which will retrieve the whole table into memory.
Passing a table_uri to gtabview will display a part of table content (without retrieving the whole table into memory)
Blaze comes with a very convenient tool named odo http://odo.readthedocs.org/
DataFrame(s) can be contruct by chunk using `odo``
from blaze import odo, chunks
chunksize = 500
for chunk in odo(ds, chunks(pd.DataFrame), chunksize=chunksize):
    print(chunk)

with odo(..., chunks(pd.DataFrame)) you only have one chunk in memory at a time.
I can provide you a quite big MySQL table with Poitiers weather conditions (from 2011-03-07 to 2015-06-02 every 10 minutes - more than 200'000 rows) to try if you don't have a quite long table.
Kind regards

On 24/07/15 09:18, scls19fr wrote:

Hello,
Blaze http://blaze.pydata.org/ is very efficient when you want to
connect to a database and
want to retrieve data from a very long table.

Blaze would indeed be nice to support.
It would also be convenient to read xls files as well.

Yes or also very big CSV file

On 24/07/15 09:47, scls19fr wrote:

Yes or also very big CSV file

Does blaze do anything in that regard?
AFAIK, most projects I've ever seen, load the csv into memory.
The notable exception is tabix, where an index needs to be constructed
first.

I thinks Blaze don't load the whole CSV into memory
In [25]: %time pd.read_csv("meteo.csv")
CPU times: user 2.4 s, sys: 264 ms, total: 2.66 s
Wall time: 2.78 s

In [26]: %time bz.Data("meteo.csv")
CPU times: user 71.1 ms, sys: 20.5 ms, total: 91.6 ms
Wall time: 106 ms

I'm not sure Blaze support Excel files. Pandas does (.xls and .xlsx) but the whole content need to be in memory.

On 24/07/15 10:21, scls19fr wrote:

I'm not sure Blaze support Excel files. Pandas does (.xls and .xlsx) but
the whole content need to be in memory.

Yes, pandas use xlrd, which doesn't do anything special.
There is also pyExcelerator, but I never used it to see if it supports
partial reading. xlsx files internally are xml-based, so I doubt.

Anyway this could (should) be done inside Blaze not gtabview

On 24/07/15 12:34, scls19fr wrote:

Anyway this could (should) be done inside Blaze not gtabview

Well I added some simple support using "xlrd" now.
If xlrd is installed (likely, if you already have matplotlib), you can
now also read excel files.
I added a --sheet/-S flag to select the sheet.

That's always a good thing but
$ gtabview random.xlsx

raises:
Traceback (most recent call last):
  File "//anaconda/bin/gtabview", line 4, in <module>
    __import__('pkg_resources').run_script('gtabview==0.1', 'gtabview')
  File "//anaconda/lib/python3.4/site-packages/setuptools-18.0.1-py3.4.egg/pkg_resources/__init__.py", line 735, in run_script
  File "//anaconda/lib/python3.4/site-packages/setuptools-18.0.1-py3.4.egg/pkg_resources/__init__.py", line 1659, in run_script
  File "//anaconda/lib/python3.4/site-packages/gtabview-0.1-py3.4.egg/EGG-INFO/scripts/gtabview", line 88, in <module>
  File "//anaconda/lib/python3.4/site-packages/gtabview-0.1-py3.4.egg/gtabview/__init__.py", line 111, in view
  File "//anaconda/lib/python3.4/site-packages/gtabview-0.1-py3.4.egg/gtabview/dataio.py", line 80, in read_table
  File "//anaconda/lib/python3.4/site-packages/gtabview-0.1-py3.4.egg/gtabview/dataio.py", line 68, in read_xlrd
  File "//anaconda/lib/python3.4/site-packages/xlrd/book.py", line 432, in sheet_by_index
    return self._sheet_list[sheetx] or self.get_sheet(sheetx)
TypeError: list indices must be integers, not NoneType

On 24/07/15 14:07, scls19fr wrote:

That's always a good thing but
|$ gtabview random.xlsx |

Send me the file if you can.

You might also fix
--start_pos START_POS, -s START_POS
                    Initial cursor display position. Single number for
                    just y (row) position, or two comma-separated numbers
                    (--start_pos 2,3) for both. Alternatively, you can
                    pass the numbers in the more classic +y:[x] format
                    without the --start_pos label. Like 'tabview <fn>
                    +5:10'

replace tabview by gtabview

File(s) was created using:
df = pd.DataFrame(np.random.random((5,3)), columns=['A', 'B', 'C'])
df.to_excel("random.xls")
df.to_excel("random.xlsx")

On 24/07/15 14:10, scls19fr wrote:

You might also fix
|--start_pos START_POS, -s START_POS Initial cursor display position.
Single number for just y (row) position, or two comma-separated numbers
(--start_pos 2,3) for both. Alternatively, you can pass the numbers in
the more classic +y:[x] format without the --start_pos label. Like
'tabview  +5:10' |

Both should be fixed.

$ gtabview random.xlsx
Traceback (most recent call last):
  File "//anaconda/bin/gtabview", line 4, in <module>
    __import__('pkg_resources').run_script('gtabview==0.1', 'gtabview')
  File "//anaconda/lib/python3.4/site-packages/setuptools-18.0.1-py3.4.egg/pkg_resources/__init__.py", line 735, in run_script
  File "//anaconda/lib/python3.4/site-packages/setuptools-18.0.1-py3.4.egg/pkg_resources/__init__.py", line 1659, in run_script
  File "//anaconda/lib/python3.4/site-packages/gtabview-0.1-py3.4.egg/EGG-INFO/scripts/gtabview", line 88, in <module>
  File "//anaconda/lib/python3.4/site-packages/gtabview-0.1-py3.4.egg/gtabview/__init__.py", line 111, in view
  File "//anaconda/lib/python3.4/site-packages/gtabview-0.1-py3.4.egg/gtabview/dataio.py", line 99, in read_table
TypeError: object of type 'float' has no len()

On 24/07/15 14:20, scls19fr wrote:

|$ gtabview random.xlsx Traceback (most recent call last): File

Hopefully fixed.
Thanks for sending me the file, at the moment the xls writer in pandas
doesn't work for me (some exception in openpyxl).

It works with random.xls and random.xlsx
meteo.xlsx that I send you by email doesn't open in an acceptable time.
(Excel is able to open this file in less than 1 minute)

On 24/07/15 14:44, scls19fr wrote:

It works with |random.xls| and |random.xlsx|
|meteo.xlsx| that I send you by email doesn't open in an acceptable time.
(Excel is able to open this file in less than 1 minute)

I cannot test that file yet, since I cannot download large stuff from here.
How many rows/columns is that? Does it fit in a xls file? I could try to
generate one here.
I doubt it's a problem in gtabview itself, xlrd itself seems to be
really slow. Just opening a <1mb file takes seconds on my system.
Maybe openpyxl is faster in that regard.

It's a 19.6 Mb file with 23 columns and 208655 rows

On 24/07/15 14:57, scls19fr wrote:

It's a 19.6 Mb file with 23 columns and 208655 rows

if you can squeeze that into <1mb, I can try to get it.

zip reduces size to 17.3 Mb
openpyxl seems to support "big" files
https://openpyxl.readthedocs.org/en/latest/optimized.html

On 24/07/15 14:47, Yuri D'Elia wrote:

I doubt it's a problem in gtabview itself, xlrd itself seems to be
really slow. Just opening a <1mb file takes seconds on my system.
Maybe openpyxl is faster in that regard.

I just tried with the openpyxl "optimized" reader, and on a 1mb file
it's 1 second slower than xlrd.
pd.read_excel/gtabview seem to be identical in timing as well.. so I
don't think there's much we can improve on this.

I'll need some help to get up-to-speed with blaze.
What's the difference between blaze.Data.fields and columns?
How do I access a column by index efficiently?

Hello,
sorry I was here
dat[dat.fields[3]]

can access to the third columns
but I can't say if that's efficient.
Kind regards

On 28/07/15 18:59, scls19fr wrote:

Hello,
sorry I was here
|dat[dat.fields[3]] |
can access to the third columns
but I can't say if that's efficient.

Do you also know if there's a way to know the number of the results in
advance?
Even for a csv, dshape doesn't contain the row count.

I don't know Blaze a lot but with IPython
dat.  helps me to find:
dat.nrows

or
dat.nelements()

and
len(dat.columns)

to know number of columns

caution about this
In [72]: type(dat.nrows)
Out[72]: blaze.expr.reductions.nelements

So it may be better to cast to int
int(dat.nrows)

On 28/07/15 20:39, scls19fr wrote:

caution about this
|In [72]: type(dat.nrows) Out[72]: blaze.expr.reductions.nelements |
So it may be better to cast to int

I've got some basics going, but it seems that blaze itself doesn't
perform any caching about the result.
Querying list(data[col][0:1]) to get one element from a column, for
example, would issue two sql queries if done twice.
Are you aware if there's some built-in caching mechanism in blaze, if it
can be turned on, or if I need to build one?

My idea is you might get a DataFrame from Blaze.
But not the whole data... just what can be view in gtabview.
import pandas as pd
from odo import odo
df = odo(dat[dat.columns[0:5]][10:15], pd.DataFrame)

it should avoid several queries.

On 28/07/15 21:17, scls19fr wrote:

My idea is you might get a DataFrame from Blaze.
But not the whole data... just what can be view in gtabview.
|import pandas as pd from odo import odo df =
odo(dat[dat.columns[0:5]][10:15], pd.DataFrame) |
it should avoid several queries.

Yes, however when scrolling is involved and a new row is in view, you
don't want to re-fetch the previous ones.
Making the query itself in blaze, even for one row is quite expensive,
so some sort of caching is required to make viewing "decent".

Why not trying first without this cache mechanism ? and if that's really too long, implement this cache mechanism.
I always try to recall Donald Knuth sentence: "premature optimization is the root of all evil"
On my computer screen I can display less than 23 columns and 25 rows
23x25=575
being pessimistic (very big screen) and considering 1000 elements.
import pandas as pd
from sqlalchemy import create_engine
import numpy as np
import blaze as bz
from odo import odo

N = 1000

def pandas_read_sql(N):
    db_uri = "mysql+mysqlconnector://root:root@<IP_ADDRESS>:3306/meteo"
    engine = create_engine(db_uri)
    df = pd.read_sql("SELECT * FROM data LIMIT %d" % N, engine)
    return df

def blaze_odo(N):
    table_uri = "mysql+mysqlconnector://root:root@<IP_ADDRESS>:3306/meteo::data"
    dat = bz.Data(table_uri)
    df = odo(dat[0:N], pd.DataFrame)
    return df

In [26]: %time df = pandas_read_sql(N)
CPU times: user 132 ms, sys: 14 ms, total: 146 ms
Wall time: 151 ms

In [33]: %time df = blaze_odo(N)
//anaconda/lib/python3.4/site-packages/blaze/compute/sql.py:856: UserWarning: The order of the result set from a Slice expression computed against the SQL backend is not deterministic.

warnings.warn('The order of the result set from a Slice expression '
CPU times: user 158 ms, sys: 8.26 ms, total: 167 ms
Maybe we can accept waiting less than 0.2 s before fetching a new row (and also fetching again rows we have ever fetched)

On 29/07/15 08:38, scls19fr wrote:

Why not trying first without this cache mechanism ? and if that's really
too long, implement this cache mechanism.

It's really too slow.
Since I'm fetching each cell independently, the blaze overhead for a
screenful (30x20) is ~15 seconds.
Also, this breaks completely column auto-sizing.
Blaze really requires some batch manipulation, and it's definitely
slower for datasets that fit into memory.

It's in.
import blaze as bz
from gtabview import view
data = bz.Data('data_ohlcv.csv')
view(data)

I tested it against some large postesql tables and also seems ok (although blaze reports a warning about non-deterministic slicing).

Nice!
I've just test it with a MySQL table with 200 000 rows and that's very convenient.
Thanks a lot.
I think next feature should be to detect that view parameter is a table URI
and to automatically create a blaze.interactive.InteractiveSymbol from this table URI.
So it will be possible to do:
view(table_uri)

and with console
$ gtabview dialect+driver://user:password@host:port/databasename::tablename

CAUTION: I think this last command could lead some security problem because of Bash history
so maybe you should provide a command like:
$ gtabview secure
which open a window to paste URI (with password) or anything that view can accept. So no one could see password in history.

I think you will have to detect that parameter is a table URI using a regex.
regex101 is great for this https://regex101.com/
an other approach could be to split filename and extension
filename, file_extension = os.path.splitext('/path/to/somefile.ext')

and if file_extension is an empty string dispatch to DB table viewer.

What about a blaze+[blaze uri] ?
This would make loading always un-ambiguous.
gtabview blaze+file.csv would load the file through blaze as opposed to anything else, which is a good thing since for small csv files blaze is actually slower.
As a convenience, if the argument looks like an url, would could also try blaze:

If url contains blaze+: try blaze
elif url looks like url: try blaze
load normally

Loading an hdf file directly wouldn't work out of the box (you'd still need blaze+file.hdf), but using blaze by default sounds like a bad idea.

I really want to be able to directly open table URI without specifying blaze+ (it seems to be your idea with "elif url looks like url: try blaze")
You are right, you could load CSV using "classic" method or using blaze.
For this I think an other parameter should be given

it's much more explicit

and it could lead to some mistakes

'blaze+dialect+driver://user:password@host:port/databasename::tablename'

'blaze+dialect://user:password@host:port/databasename::tablename'

Load csv using Blaze
$ gtabview file.csv --engine blaze

Load csv using classic method
$ gtabview file.csv

$ gtabview file.csv --engine default

Some database URI examples
http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html
sqlite:///:memory: is also a database URI
table URI are database URI with ::tablename

I'd like to keep gtabview.view() (the function) and gtabview (the
command) identical at least in behavior.
However, this would imply an extra parameter to view, which I would like
to avoid.
In gtabview.view() there's also less need to use blaze under the hood.
If you want blaze, you can supply a blaze object directly to view().
Somehow, blaze refuses to load file://[path], which would have make the
behavior perfect.
I tried with a couple other syntaxes, but no success.

Personally I would prefer gtabview.view() to (also) accept table URI and build bz.Data(...) inside.
That's the spirit of my PR https://github.com/pydata/pandas/pull/10666 which allow pandas.read_sql pandas.to_sql to accept a db URI as con and build a SQLAlchemy engine inside.

I committed some changes which should be reasonable enough:
If the path looks like an URI, use Blaze, otherwise read/handle it normally.
So gtabview file would read it directly, while gtabview file://file would pass through blaze. This is always un-ambiguous. Other uri-like strings will be handled by blaze, so you can read DB uris directly.

Yes, that's a reasonable approach of the problem.
Maybe that's time to publish a new package version of gtabview.
A nice feature will be to add all your work to tabview (curses) because displaying
throught SSH content of a table can be very useful.

When you write:
$ gtabview file://filename

Is filename a relative path to filename or an absolute ?
if that's a relative path to filename, how an absolute path should be given ?

On 31/07/15 16:23, scls19fr wrote:

When you write:
|$ gtabview file://filename |
Is filename a relative path to filename or an absolute ?
if that's a relative path to filename, how an absolute path should be
given ?

It's relative. The path starts after ://.
If you want absolute, simply use file:///

ok thanks

Closing

On 31/07/15 16:16, scls19fr wrote:

Maybe that's time to publish a new package version of gtabview.

Done right now.
I wanted to complete at least some docstrings in view() itself this time.

Thanks. This is a really great feature.


[Code Change] AzCopy Error Improvements

Added Error Code URL as seen below, proposed by Daniel
failed to perform copy command due to error: cannot start job due to error: cannot list files due to reason GET https://siminmaintest.blob.core.windows.net/test
--------------------------------------------------------------------------------
RESPONSE 401: 401 Server failed to authenticate the request. Please refer to the information in the www-authenticate header.
ERROR CODE: NoAuthenticationInformation
--------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?><Error>NoAuthenticationInformation<Message>Server failed to authenticate the request. Please refer to the information in the www-authenticate header.
RequestId:36f56f01-101e-000f-124c-8c69c6000000
Time:2024-04-11T20:13:02.1634782Z</Message></Error>
--------------------------------------------------------------------------------
.
ERROR DETAILS: https://aka.ms/AzCopyError/NoAuthenticationInformation

Added error code URLs to commonly used commands: copy, sync, remove, and list.

@siminsavani-msft linked are active

Another thought-- Does this catch things like a job failing after it begins running?

Have we added tests for list, remove as we discussed ?

Was working on other PRs, just added now!

Another thought-- Does this catch things like a job failing after it begins running?

Mostly catches the service side errors and spits out related shorthand error code URLs.


Added a guide to the tutorial.md section of the website.

Changes made:

I added a brief guide to the create an admin step that will enable first users on what to expect when the command is executed.

Please check the following:

[ ] Do the tests still pass?[^1]
[ ] Does the code comply with the style guide?

[ ] Run make lint from the Wagtail root.

[ ] For Python changes: Have you added tests to cover the new/fixed behaviour?
[ ] For front-end changes: Did you test on all of Wagtail’s supported environments?[^2]

[ ] Please list the exact browser and operating system versions you tested:
[ ] Please list which assistive technologies [^3] you tested:

[ ] For new features: Has the documentation been updated accordingly?

Please describe additional details for testing this change.
[^1]: Development Testing
[^2]: Browser and device support
[^3]: Accessibility Target

I'm not against this change but think it would be really good to understand the expected knowledge level of someone doing this getting started tutorial.
If we are needing to communicate how some of the basics of how to use the terminal, such as passwords are not rendered visibly, we may need to rethink this documentation page a bit more.
An alternative approach is to start the tutorial with a bit of an expectation of base knowledge.
If we are expecting someone to use this tutorial that has never used a terminal before, that's also fine, just needs to be an explicit goal called out at the start.

Thanks for the reminder
I'll put it into consideration
On Sun, Oct 16, 2022, 12:46 AM LB (Ben Johnston) @.***>
wrote:

I'm not against this change but think it would be really good to
understand the expected knowledge level of someone doing this getting
started tutorial.
If we are needing to communicate how some of the basics of how to use the
terminal, such as passwords are not rendered visibly, we may need to
rethink this documentation page a bit more.
An alternative approach is to start the tutorial with a bit of an
expectation of base knowledge.
If we are expecting someone to use this tutorial that has never used a
terminal before, that's also fine, just needs to be an explicit goal called
out at the start.
—
Reply to this email directly, view it on GitHub
https://github.com/wagtail/wagtail/pull/9371#issuecomment-1279853251,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEPEESYQQUMBBER7OYBZPODWDM635ANCNFSM6AAAAAARF7BTGI
.
You are receiving this because you authored the thread.Message ID:
@.***>

The changes you made is brief and direct.
I'll tweak it a bit
On Mon, Oct 17, 2022, 3:41 PM Thibaud Colas @.***>
wrote:

@.**** requested changes on this pull request.
@dchidindu5 https://github.com/dchidindu5 this looks good to me but I
think we need to be much more concise. As LB mentions we should expect some
knowledge, and we don’t want people to have to read too much text.
Have a look at my proposed change, tweak if you want, and let us know
In docs/getting_started/tutorial.md
https://github.com/wagtail/wagtail/pull/9371#discussion_r997148695:

+When this command is exceuted it prompts the user to add a username, email and password.

-When logged into the admin site, a superuser has full permissions and is able to view/create/manage the database.
+Note that when typing the password, the text remains unseen by the user because it's written in a command line interface.
+The login details used here will be used to access the admin site, which gives you a superuser permission to view/create/manage the database.
⬇ Suggested change
-When this command is exceuted it prompts the user to add a username, email and password.

-When logged into the admin site, a superuser has full permissions and is able to view/create/manage the database.
-Note that when typing the password, the text remains unseen by the user because it's written in a command line interface.
-The login details used here will be used to access the admin site, which gives you a superuser permission to view/create/manage the database.
+This will prompt you to create a new superuser account with full permissions. Note the password text won’t be visible when typed, for security reasons.
—
Reply to this email directly, view it on GitHub
https://github.com/wagtail/wagtail/pull/9371#pullrequestreview-1144289863,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEPEES6HZBJ3S2DDND7LLWLWDVQRHANCNFSM6AAAAAARF7BTGI
.
You are receiving this because you were mentioned.Message ID:
@.***>

👍 let me know once we’re good @dchidindu5


Order of fields in sap.m.SimpleForm changes when setting fields visible/invisible

OpenUI5 version: 1.71, 1.60
Browser/version (+device/version): Chrome 92.0.4515.131
Any other tested browsers/devices(OK/FAIL): -
URL (minimal example if possible): https://jsbin.com/pofoyel/2/edit?html,output
User/password (if required and possible - do not post any confidential information here): -
Steps to reproduce the problem:

Create a sap.m.SimpleForm containing sap.m.Labels and sap.m.Inputs. Some of them are dynamic (whose visibility is changed in the next step) and some of them are static (which stay visible the whole time)
Toggle the visibility of the dynamic fields (which are above and below the static ones)
The order of the static fields has changed

What is the expected result?
The order of the fields in the SimpleForm stays the same after toggling the visiblity
What happens instead?
The order of the fields in the SimpleForm has changed after toggling the visiblity
Any other information? (attach screenshot if possible)
This error does not occur with OpenUI5 version 1.44

Hello @jh-simplifier,
Thank you for sharing this finding.
I've created an internal incident with ID:<PHONE_NUMBER>. The status of the issue will be updated here in GitHub.
Regards,
Boyan Rakilovski

Hello,
I am forwarding the reply from the colleague of the responsible team:
"This seems to be an issue of the old outdated, and meanwhile deprecated, ResponsiveLayout. This should not used anymore. For compatibility reasons we could not change the default of the SimpleForm. But if "ResponsiveGridLayout" or "ColumnLayout" is used the issue don't occur. To meet the current UX guidelines the ColumnLayout should be used."
Therefore I am closing the issue.
Best regards,
Tereza


MobileStepper classes prop should be optional?

Problem description
MobileStepper's classes prop is set as required, meanwhile in docs it is not marked as required.
It looks like MobileStepper component works just fine without classes prop and I suppose it's a desired behavior. So classes prop should be optional, shouldn't it?
Versions

Material-UI: 1.0.0-beta.6
React: 15.6.1
Browser: N/A

Upps, somehow I missed, that classes is passed from withStyles HOC :/
Sorry for bothering :)

@cherniavskii I see that it is from withStyles HOC, but I agree with you it doesn't make sense for the end user since it is actually not required. Perhaps it should use defaultProps of classes to be {} and remove the requirement for it to be required?

We have changed the pattern with flow: https://github.com/callemall/material-ui/blob/v1-beta/src/Form/FormGroup.js#L31. As we are transitioning all our component toward it, it should be fine. I would exect less people to be able to understand the flow type definitions, eventually, they will fall back to the documentation where it's correct.

thanks @oliviertassinari


Unity BodyTracking Sample catching exception for background thread result = K4A_RESULT_FAILED

Describe the bug

unity Example stops at init, catching exception for background thread result = K4A_RESULT_FAILED
I have found possible typo on MoveLibraryFiles.bat.
copy %BODY_TRACKING_TOOLS_PATH%cudnn64_cnn_infer64_8.dll./ copy %BODY_TRACKING_TOOLS_PATH%cudnn64_ops_infer64_8.dll
Azure Kinect Body Tracking SDK did not have such two files.
But it had
cudnn_ops_infer64_8.dll
cudnn_cnn_infer64_8.dll
Unfortunately fixing these two possible typo didn't fix the K4A_RESULT_FAILED issue.

To Reproduce
Execute all the steps on the readme.
open sample scene on unity and play.

Desktop (please complete the following information):

OS with Version:Windows 19042.928
SDK Version: Azure Kinect SDK v1.4.1 / Azure Kinect Body Tracking SDK v1.1.0
Firmware version:  Current Firmware Versions:
RGB camera firmware:      1.6.102
Depth camera firmware:    1.6.75
Depth config file:        6109.7
Audio firmware:           1.6.14
Build Config:             Production
-Unity Version: 2019.1.14f1

Additional context
k4aviewer and k4abt_simple_3d_viewer works flawlessly.

I got the sample project working.
Not really a solution but, I copied all the dlls from the SDK to the unity project and now it works.
I assume that the batch file is missing some files to copy.

It's not a radical measure, but if you use TrackerProcessingMode.Cuda instead of TrackerProcessingMode.Gpu when initializing Tracker, it will work for the time being.
https://github.com/microsoft/Azure-Kinect-Samples/blob/master/body-tracking-samples/sample_unity_bodytracking/Assets/Scripts/SkeletalTrackingProvider.cs#L46

It's not a radical measure, but if you use TrackerProcessingMode.Cuda instead of TrackerProcessingMode.Gpu when initializing Tracker, it will work for the time being.
https://github.com/microsoft/Azure-Kinect-Samples/blob/master/body-tracking-samples/sample_unity_bodytracking/Assets/Scripts/SkeletalTrackingProvider.cs#L46

Thank you for the tip!
Cuda mode works a lot faster then GPU mode!

This problem will be solved with https://github.com/microsoft/Azure-Kinect-Samples/pull/62.


Add wasm32-unknown-unknown support

All credit to @passchaos in #935 for the insight that SQLite only uses a very small subset of libc, that can easily be copied in-tree.
Significant changes from that PR:

Using pristine libc .c files from OpenBSD
Minimal libc headers
libsqlite3-sys/sqlite3/sqlite3.c kept pristine
Removed custom memvfs, replaced by a thin VFS that liberally returns SQLITE_IOERR. This target is intended to be used only with Connection::open_in_memory() or equivalent.
Builds and runs a basic integration test in CI, via wasm-pack.

The allocator's free() method is still a little weird, but it is documented that SQLite's default allocator stores the allocation length in the first 8 bytes: https://sqlite.org/malloc.html#the_default_memory_allocator . If we want to wrap it again, I'm happy to do that, just let me know.
To do:

[x] Audit SQLite API for structures passed by value
[x] Improve time-related and randomness implementations

Closes #488, closes #827, closes #935

I reviewed https://sqlite.org/capi3ref.html, and did not see any instances of structs being passed or returned by value.
@thomcc Does this PR look roughly acceptable, if I sort out the time and randomness-related bits?

Give me some time to review it, but thanks for the work.

@wngr Thanks! It does seem plausible to make a VFS that uses IndexedDB as a backend; that would be very cool. I don't expect to personally have time to work on it in the near future, but would love to see it happen.

A concern from the previous PR:

A lot of the declarations in the header don't have definitions. What's the deal there?

I believe what's happening (in the few cases of this that still exist) is that the amalgamation is relying on certain declarations existing, but never actually uses them in the ultimately-generated code. If they were used, the WASM file would fail to load with its cryptic version of an "undefined symbol" error, see for example https://github.com/rustwasm/wasm-bindgen/issues/2570
This is essentially how I decided which libc files to include; provide the minimal declarations that allowed compilation, and then track down the symbols that needed to be added that would allow the WASM to load.

@thomcc Ready for review.

Reimplemented the allocator functions to explicitly store allocation size in a header.
Implemented required time & randomness functions.

@thomcc Any chance you could review this PR? wasm32-unknown-unknown support would be awesome :smile:

I tried using this and ran into the following (click to expand)

error: failed to run custom build command for `libsqlite3-sys v0.23.2 (https://github.com/trevyn/rusqlite.git?branch=wasm32-unknown-unknown#004cf263)`

Caused by:
  process didn't exit successfully: `/Users/py/projects/codebase-labs/ic-sqlite/main/target/debug/build/libsqlite3-sys-5deb3527a4482ea4/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=sqlite3/sqlite3.c
  cargo:rerun-if-changed=sqlite3/wasm32-wasi-vfs.c
  cargo:rerun-if-env-changed=SQLITE_MAX_VARIABLE_NUMBER
  cargo:rerun-if-env-changed=SQLITE_MAX_EXPR_DEPTH
  cargo:rerun-if-env-changed=LIBSQLITE3_FLAGS
  TARGET = Some("wasm32-unknown-unknown")
  OPT_LEVEL = Some("0")
  HOST = Some("aarch64-apple-darwin")
  CC_wasm32-unknown-unknown = None
  CC_wasm32_unknown_unknown = None
  TARGET_CC = Some("cc")
  CFLAGS_wasm32-unknown-unknown = None
  CFLAGS_wasm32_unknown_unknown = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("llvm14-builtins-abi")
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-I" "sqlite3/wasm32-unknown-unknown/include" "-DSQLITE_CORE" "-DSQLITE_DEFAULT_FOREIGN_KEYS=1" "-DSQLITE_ENABLE_API_ARMOR" "-DSQLITE_ENABLE_COLUMN_METADATA" "-DSQLITE_ENABLE_DBSTAT_VTAB" "-DSQLITE_ENABLE_FTS3" "-DSQLITE_ENABLE_FTS3_PARENTHESIS" "-DSQLITE_ENABLE_FTS5" "-DSQLITE_ENABLE_JSON1" "-DSQLITE_ENABLE_LOAD_EXTENSION=1" "-DSQLITE_ENABLE_MEMORY_MANAGEMENT" "-DSQLITE_ENABLE_RTREE" "-DSQLITE_ENABLE_STAT2" "-DSQLITE_ENABLE_STAT4" "-DSQLITE_SOUNDEX" "-DSQLITE_THREADSAFE=1" "-DSQLITE_USE_URI" "-DHAVE_USLEEP=1" "-D_POSIX_THREAD_SAFE_FUNCTIONS" "-DHAVE_LOCALTIME_R" "-DSQLITE_OS_OTHER" "-DSQLITE_TEMP_STORE=3" "-DLONGDOUBLE_TYPE=double" "-DSQLITE_OMIT_LOCALTIME" "-o" "/Users/py/projects/codebase-labs/ic-sqlite/main/target/wasm32-unknown-unknown/debug/build/libsqlite3-sys-f5f455669bc46cf2/out/sqlite3/sqlite3.o" "-c" "sqlite3/sqlite3.c"
  cargo:warning=In file included from sqlite3/sqlite3.c:24572:
  cargo:warning=In file included from /nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/sysctl.h:83:
  cargo:warning=In file included from /nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/ucred.h:76:
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/bsm/audit.h:203:2: error: unknown type name 'dev_t'
  cargo:warning=        dev_t           port;
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/bsm/audit.h:209:2: error: unknown type name 'dev_t'
  cargo:warning=        dev_t           at_port;
  cargo:warning=        ^
  cargo:warning=In file included from sqlite3/sqlite3.c:24572:
  cargo:warning=In file included from /nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/sysctl.h:83:
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/ucred.h:101:2: error: unknown type name 'u_int'
  cargo:warning=        u_int   cr_version;             /* structure layout version */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/ucred.h:104:2: error: unknown type name 'gid_t'
  cargo:warning=        gid_t   cr_groups[NGROUPS];     /* advisory group list */
  cargo:warning=        ^
  cargo:warning=In file included from sqlite3/sqlite3.c:24572:
  cargo:warning=In file included from /nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/sysctl.h:84:
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:109:2: error: unknown type name 'caddr_t'
  cargo:warning=        caddr_t user_stack;     /* where user stack was allocated */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:114:2: error: unknown type name 'u_int'
  cargo:warning=        u_int   p_estcpu;        /* Time averaged value of p_cpticks. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:116:2: error: unknown type name 'fixpt_t'
  cargo:warning=        fixpt_t p_pctcpu;        /* %cpu for this process during p_swtime */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:119:2: error: unknown type name 'u_int'
  cargo:warning=        u_int   p_swtime;        /* Time swapped in or out. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:120:2: error: unknown type name 'u_int'
  cargo:warning=        u_int   p_slptime;       /* Time since last blocked. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:123:2: error: unknown type name 'u_quad_t'
  cargo:warning=        u_quad_t p_uticks;              /* Statclock hits in user mode. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:124:2: error: unknown type name 'u_quad_t'
  cargo:warning=        u_quad_t p_sticks;              /* Statclock hits in system mode. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:125:2: error: unknown type name 'u_quad_t'
  cargo:warning=        u_quad_t p_iticks;              /* Statclock hits processing intr. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:134:2: error: unknown type name 'u_char'; did you mean 'char'?
  cargo:warning=        u_char  p_priority;     /* Process priority. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:135:2: error: unknown type name 'u_char'; did you mean 'char'?
  cargo:warning=        u_char  p_usrpri;       /* User-priority based on p_cpu and p_nice. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:140:2: error: unknown type name 'u_short'; did you mean 'short'?
  cargo:warning=        u_short p_xstat;        /* Exit status for wait; also stop signal. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/proc.h:141:2: error: unknown type name 'u_short'; did you mean 'short'?
  cargo:warning=        u_short p_acflag;       /* Accounting flags. */
  cargo:warning=        ^
  cargo:warning=In file included from sqlite3/sqlite3.c:24572:
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/sysctl.h:453:2: error: unknown type name 'gid_t'
  cargo:warning=        gid_t   p_rgid;                 /* Real group id. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/sysctl.h:454:2: error: unknown type name 'gid_t'
  cargo:warning=        gid_t   p_svgid;                /* Saved effective group id. */
  cargo:warning=        ^
  cargo:warning=/nix/store/qzzicx3cjj00z0c4kx3v0919gqp40mnp-libSystem-11.0.0/include/sys/sysctl.h:462:2: error: unknown type name 'gid_t'
  cargo:warning=        gid_t   cr_groups[NGROUPS];     /* groups */
  cargo:warning=        ^
  cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
  cargo:warning=20 errors generated.
  exit status: 1
--- stderr
error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-I" "sqlite3/wasm32-unknown-unknown/include" "-DSQLITE_CORE" "-DSQLITE_DEFAULT_FOREIGN_KEYS=1" "-DSQLITE_ENABLE_API_ARMOR" "-DSQLITE_ENABLE_COLUMN_METADATA" "-DSQLITE_ENABLE_DBSTAT_VTAB" "-DSQLITE_ENABLE_FTS3" "-DSQLITE_ENABLE_FTS3_PARENTHESIS" "-DSQLITE_ENABLE_FTS5" "-DSQLITE_ENABLE_JSON1" "-DSQLITE_ENABLE_LOAD_EXTENSION=1" "-DSQLITE_ENABLE_MEMORY_MANAGEMENT" "-DSQLITE_ENABLE_RTREE" "-DSQLITE_ENABLE_STAT2" "-DSQLITE_ENABLE_STAT4" "-DSQLITE_SOUNDEX" "-DSQLITE_THREADSAFE=1" "-DSQLITE_USE_URI" "-DHAVE_USLEEP=1" "-D_POSIX_THREAD_SAFE_FUNCTIONS" "-DHAVE_LOCALTIME_R" "-DSQLITE_OS_OTHER" "-DSQLITE_TEMP_STORE=3" "-DLONGDOUBLE_TYPE=double" "-DSQLITE_OMIT_LOCALTIME" "-o" "/Users/py/projects/codebase-labs/ic-sqlite/main/target/wasm32-unknown-unknown/debug/build/libsqlite3-sys-f5f455669bc46cf2/out/sqlite3/sqlite3.o" "-c" "sqlite3/sqlite3.c" with args "cc" did not execute successfully (status code exit status: 1).

I was previously trying to use @rkusa's branch and had to set TARGET_CC for that to build, but that's the only thing I'm explicitly setting here.

For what it's worth, this is what happens if I don't set TARGET_CC:

error: failed to run custom build command for `libsqlite3-sys v0.23.2 (https://github.com/trevyn/rusqlite.git?branch=wasm32-unknown-unknown#004cf263)`

Caused by:
  process didn't exit successfully: `/Users/py/projects/codebase-labs/ic-sqlite/main/target/debug/build/libsqlite3-sys-5deb3527a4482ea4/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=sqlite3/sqlite3.c
  cargo:rerun-if-changed=sqlite3/wasm32-wasi-vfs.c
  cargo:rerun-if-env-changed=SQLITE_MAX_VARIABLE_NUMBER
  cargo:rerun-if-env-changed=SQLITE_MAX_EXPR_DEPTH
  cargo:rerun-if-env-changed=LIBSQLITE3_FLAGS
  TARGET = Some("wasm32-unknown-unknown")
  OPT_LEVEL = Some("0")
  HOST = Some("aarch64-apple-darwin")
  CC_wasm32-unknown-unknown = None
  CC_wasm32_unknown_unknown = None
  TARGET_CC = None
  CC = Some("clang")
  CFLAGS_wasm32-unknown-unknown = None
  CFLAGS_wasm32_unknown_unknown = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  running: "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=wasm32-unknown-unknown" "-I" "sqlite3/wasm32-unknown-unknown/include" "-DSQLITE_CORE" "-DSQLITE_DEFAULT_FOREIGN_KEYS=1" "-DSQLITE_ENABLE_API_ARMOR" "-DSQLITE_ENABLE_COLUMN_METADATA" "-DSQLITE_ENABLE_DBSTAT_VTAB" "-DSQLITE_ENABLE_FTS3" "-DSQLITE_ENABLE_FTS3_PARENTHESIS" "-DSQLITE_ENABLE_FTS5" "-DSQLITE_ENABLE_JSON1" "-DSQLITE_ENABLE_LOAD_EXTENSION=1" "-DSQLITE_ENABLE_MEMORY_MANAGEMENT" "-DSQLITE_ENABLE_RTREE" "-DSQLITE_ENABLE_STAT2" "-DSQLITE_ENABLE_STAT4" "-DSQLITE_SOUNDEX" "-DSQLITE_THREADSAFE=1" "-DSQLITE_USE_URI" "-DHAVE_USLEEP=1" "-D_POSIX_THREAD_SAFE_FUNCTIONS" "-DHAVE_LOCALTIME_R" "-DSQLITE_OS_OTHER" "-DSQLITE_TEMP_STORE=3" "-DLONGDOUBLE_TYPE=double" "-DSQLITE_OMIT_LOCALTIME" "-o" "/Users/py/projects/codebase-labs/ic-sqlite/main/target/wasm32-unknown-unknown/debug/build/libsqlite3-sys-f5f455669bc46cf2/out/sqlite3/sqlite3.o" "-c" "sqlite3/sqlite3.c"
  cargo:warning=clang-11: warning: argument unused during compilation: '-mmacos-version-min=11.0' [-Wunused-command-line-argument]
  cargo:warning=clang-11: warning: argument unused during compilation: '-arch arm64' [-Wunused-command-line-argument]
  cargo:warning=error: unknown target CPU 'apple-a13'
  cargo:warning=note: valid target CPU values are: mvp, bleeding-edge, generic
  exit status: 1
--- stderr
error occurred: Command "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=wasm32-unknown-unknown" "-I" "sqlite3/wasm32-unknown-unknown/include" "-DSQLITE_CORE" "-DSQLITE_DEFAULT_FOREIGN_KEYS=1" "-DSQLITE_ENABLE_API_ARMOR" "-DSQLITE_ENABLE_COLUMN_METADATA" "-DSQLITE_ENABLE_DBSTAT_VTAB" "-DSQLITE_ENABLE_FTS3" "-DSQLITE_ENABLE_FTS3_PARENTHESIS" "-DSQLITE_ENABLE_FTS5" "-DSQLITE_ENABLE_JSON1" "-DSQLITE_ENABLE_LOAD_EXTENSION=1" "-DSQLITE_ENABLE_MEMORY_MANAGEMENT" "-DSQLITE_ENABLE_RTREE" "-DSQLITE_ENABLE_STAT2" "-DSQLITE_ENABLE_STAT4" "-DSQLITE_SOUNDEX" "-DSQLITE_THREADSAFE=1" "-DSQLITE_USE_URI" "-DHAVE_USLEEP=1" "-D_POSIX_THREAD_SAFE_FUNCTIONS" "-DHAVE_LOCALTIME_R" "-DSQLITE_OS_OTHER" "-DSQLITE_TEMP_STORE=3" "-DLONGDOUBLE_TYPE=double" "-DSQLITE_OMIT_LOCALTIME" "-o" "/Users/py/projects/codebase-labs/ic-sqlite/main/target/wasm32-unknown-unknown/debug/build/libsqlite3-sys-f5f455669bc46cf2/out/sqlite3/sqlite3.o" "-c" "sqlite3/sqlite3.c" with args "clang" did not execute successfully (status code exit status: 1).

@paulyoung For an aarch64-apple-darwin host, this relies on a Homebrew clang install, it looks like yours might be out of date? brew install llvm might help.
Anyway, this still works for me with:
cargo install cargo-generate
cargo generate --git https://github.com/rustwasm/wasm-pack-template

rusqlite = {git = "https://github.com/trevyn/rusqlite", branch = "wasm32-unknown-unknown", features = ["bundled"]}

wasm-pack build

Does this work for you? Are you able to link to the project that you're actually building?

@trevyn I manage my projects and their dependencies using nix (not homebrew) so it's probably a matter of figuring out what versions are needed and making sure they're being used.
I could create a minimal example project that exhibits this issue if it would help.

I created a standalone project here:
https://github.com/paulyoung/rusqlite-wasm32-unknown-unknown-nix
and asked about it on the Nix forums here:
https://discourse.nixos.org/t/help-building-rusqlite-for-wasm32-unknown-unknown-with-crane/21724

Fancy! In that case, libsqlite3-sys/build.rs is looking for the CC and AR env variables to be set to a clang and llvm-ar that support wasm32-unknown-unknown. I know Homebrew's<EMAIL_ADDRESS>works, not sure what the minimum requirements are otherwise.
https://github.com/trevyn/rusqlite/blob/004cf263143e038f01e6022d8d5b81b9c621f89f/libsqlite3-sys/build.rs#L253-L261

It's very nice see wasm32-unknown-unknown being added to rusqlite. @trevyn I'm trying regenerate the bindgen.rs from c header file, but looks like the generated bindgen.rs will be different when parameter target been set to wasm32-unknown-unknow and x86_64-unknown-linux-gnu. Be specified, the function sqlite3_vfs_register and other related functions will not generated when target wasm32-unknown-unknown given.
How we able to generate right bindgen.rs with target=wasm32-unknown-unknown? Thx.

hey, is this waiting for something? can it be merged?

This built fine on my m1 mac, then it failed on docker: rust:1.69.0-bookworm until i installed clang after which it built fine.
Would love to see this merged into master 🎉

If merged this would be a pretty big win for the Rust ecosystem imo

Absolutely massive. Especially since sled is dead.

this issue its related https://github.com/rustwasm/wasm-bindgen/issues/3454

I just wrote a test to init a DB connection and INSERT then SELECT using this branch (with latest master pulled into it).
It runs fine on non-wasm but when I ran it on wasm it throws: RuntimeError: indirect call to null. I could repro this on firefox and safari. The full stacktrace is here:
    JS exception that was thrown:
        RuntimeError: indirect call to null
        sqlite3OsFileControl@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3403]:0x3340f3
        sqlite3_file_control@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[761]:0x20d9e1
        sqlite3Pragma@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[61]:0x26e6d
        yy_reduce@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[60]:0x2454c
        sqlite3Parser@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[971]:0x23e22e
        sqlite3RunParser@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[301]:0x15b901
        sqlite3Prepare@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[277]:0x14cafc
        sqlite3LockAndPrepare@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[1029]:0x249b15
        sqlite3_prepare_v3@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3523]:0x339c56
        rusqlite::inner_connection::InnerConnection::prepare_::hc2f0a88ee06fb549@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[4084]:0x34f87a
        rusqlite::inner_connection::InnerConnection::prepare::h94bf9f3edeb66287@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[427]:0x19d8a3
        rusqlite::Connection::prepare_with_flags::h09f3557df09b0fc9@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3308]:0x32f292
        rusqlite::Connection::prepare::h310e550dfb17c830@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[4451]:0x35a312
        rusqlite::Connection::execute_batch::hea1042c16c0cd981@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[294]:0x1570c0
        rusqlite::pragma::<impl rusqlite::Connection>::pragma_update::hdec1666d01ace9c7@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[621]:0x1e5e75
        rusqlite_migration::set_user_version::h982001b4ab2782a6@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[1417]:0x28b38a
        rusqlite_migration::Migrations::goto_up::h727ad997790a6cb9@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[154]:0xe7555
        rusqlite_migration::Migrations::goto::h1a94cc5b0cbd3f29@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[207]:0x119bcf
        rusqlite_migration::Migrations::to_latest::hcecaa0df0427a54b@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[705]:0x1febfe
        db::lib_test::test::hc7c7c3310ec12cbf@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[628]:0x1e7f23
        core::ops::function::FnOnce::call_once::h8dd7fba8693501e0@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[5668]:0x370078
        wasm_bindgen_test::__rt::Context::execute_sync::{{closure}}::he71cc68df0d3c2a7@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3323]:0x32ff13
        <wasm_bindgen_test::__rt::TestFuture<F> as core::future::future::Future>::poll::{{closure}}::{{closure}}::hc25b673a04f73bb8@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3518]:0x33987e
        wasm_bindgen::convert::closures::invoke0_mut::h6e1e9c6b868d2ee7@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[4063]:0x34ed5a
        __wbg_adapter_41@http://<IP_ADDRESS>:38265/wasm-bindgen-test:337:10
        cb0@http://<IP_ADDRESS>:38265/wasm-bindgen-test:487:28
        window.__wbg_test_invoke@http://<IP_ADDRESS>:38265/:38:38
        __wbg_get_imports/imports.wbg.__wbg_wbgtestinvoke_7de5d5374a833823/<@http://<IP_ADDRESS>:38265/wasm-bindgen-test:492:30
        handleError@http://<IP_ADDRESS>:38265/wasm-bindgen-test:342:18
        __wbg_get_imports/imports.wbg.__wbg_wbgtestinvoke_7de5d5374a833823@http://<IP_ADDRESS>:38265/wasm-bindgen-test:480:76
        wasm_bindgen_test::__rt::__wbg_test_invoke::hb58221eb1bd2a29f@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[2517]:0x2fdf69
        <wasm_bindgen_test::__rt::TestFuture<F> as core::future::future::Future>::poll::{{closure}}::hf3411908db1aeefa@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3839]:0x346df8
        scoped_tls::ScopedKey<T>::set::h73e8dcd9e422f126@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3629]:0x33e690
        <wasm_bindgen_test::__rt::TestFuture<F> as core::future::future::Future>::poll::h4925da01429b92e6@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[653]:0x1ef992
        <wasm_bindgen_test::__rt::ExecuteTests as core::future::future::Future>::poll::h086a35e5c805ca10@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[184]:0x104fcd
        wasm_bindgen_test::__rt::Context::run::{{closure}}::hc9ef03a3fb10a54c@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[1576]:0x2a0982
        wasm_bindgen_futures::future_to_promise::{{closure}}::{{closure}}::h32d6024e9975e335@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[714]:0x20109e
        wasm_bindgen_futures::task::singlethread::Task::run::h184e97cc0ef1e77e@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[1510]:0x297fe8
        wasm_bindgen_futures::queue::QueueState::run_all::h4285a3205cd25e58@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[1151]:0x260bb3
        wasm_bindgen_futures::queue::Queue::new::{{closure}}::hc990aef658832399@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[4229]:0x35407f
        <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h17f3b0b306d2221f@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3349]:0x33156b
        __wbg_adapter_28@http://<IP_ADDRESS>:38265/wasm-bindgen-test:240:10
        real@http://<IP_ADDRESS>:38265/wasm-bindgen-test:203:20

where the test is:
use wasm_bindgen_test::{wasm_bindgen_test, wasm_bindgen_test_configure};
wasm_bindgen_test_configure!(run_in_browser);

#[derive(Debug, Eq, PartialEq, Clone)]
struct Example {
    pub id: i64,
    pub name: String,
}

#[wasm_bindgen_test]
#[test]
fn test() {
    let migrations = rusqlite_migration::Migrations::new(vec![rusqlite_migration::M::up(
        "CREATE TABLE example (id INT, name TEXT);",
    )]);
    let mut conn = rusqlite::Connection::open_in_memory().unwrap();
    migrations.to_latest(&mut conn).unwrap();

    let val = Example {
        id: 1,
        name: "test".into(),
    };
    conn.execute(
        "INSERT INTO example (id, name) VALUES (?, ?)",
        (val.id, val.name.clone()),
    )
    .expect("Failed to set");
    let res = conn
        .query_row(
            "SELECT id, name FROM example WHERE (id=?)",
            [val.id],
            |row| {
                Ok(Example {
                    id: row.get(0).unwrap(),
                    name: row.get(1).unwrap(),
                })
            },
        )
        .unwrap();
    assert_eq!(res, val);
}

Ok, it looks like this is totally broken with the latest SQLite; they've done something with long double constants that make clang bring in the f128 builtins even with -DLONGDOUBLE_TYPE=float. The builtins need the clang compiler-rt runtime linked in, and this is a bit of a nightmare with Rust and wasm.

It also looks like sqlite added a dep on strspn (https://github.com/sqlite/sqlite/commit/028acd974f3c03c489dfaa02da618af99613cde7#diff-40aa21688f1ac58ddf8ef5f0f4e472e6075411f5c4f75b9c1d512b7e03a2cbabR849). I assume this needs to be added to the libc shim in https://github.com/trevyn/rusqlite/tree/wasm32-unknown-unknown/libsqlite3-sys/sqlite3/wasm32-unknown-unknown/libc?
As for the new deps on various long double routines, the only ones that are currently pulled in are:
  (import "env" "__extenddftf2" (func $__extenddftf2 (type 99)))
  (import "env" "__getf2" (func $__getf2 (type 123)))
  (import "env" "__multf3" (func $__multf3 (type 94)))
  (import "env" "__trunctfdf2" (func $__trunctfdf2 (type 118)))
  (import "env" "__lttf2" (func $__lttf2 (type 123)))
  (import "env" "__gttf2" (func $__gttf2 (type 123)))

I guess the official sqlite3 source hasn't needed to worry about this since AFAIK they target emscripten and it apparently includes all of compiler-rt (https://github.com/emscripten-core/emscripten/tree/4b33521f103c2fb4fb218b1e1c8637a4a96b8e74/system/lib/compiler-rt)???
I'll ask around and see if anyone has figured this out yet.

I would love to see this! Can I somehow help?

I would love to see this! Can I somehow help?

So the current status is that we need to resolve the implementations of the 6 builtins carlsverre mentioned.
I can think of a few ways, in descending order of suitability (from my perspective):

Bring in a compiled library for the builtins e.g. https://github.com/jedisct1/libclang_rt.builtins-wasm32.a. This appears to be non-trivial to build from scratch, and I don't think adding a binary blob to the rusqlite repo is a great idea.

Report the issue to the SQLite team; the change that makes clang bring in long double routines was recent, and it seems they were willing to make a fix for a somewhat related issue: https://sqlite.org/src/info/legacy-msvc-workaround. I don't have a pointer to the exact change that caused the issue, or I would have made a casual post myself.

Bring in C implementations from https://github.com/llvm/llvm-project/tree/main/compiler-rt/lib/builtins, and copy them in-tree as I did for the necessary libc routines.

Interestingly, Rust just merged the RFC for f128 support, and an implementation of that would likely include implementations of the builtins in question into https://github.com/rust-lang/compiler-builtins. (Which I believe would require f128 support in the compiler first.) See https://github.com/rust-lang/rust/issues/116909

I think moving any of these forward would be helpful.

@trevyn I was snooping around the sqlite changelog and found this gem in the 3.44.0 release:
13. SQLite now performs run-time detection of whether or not the underlying hardware supports "long double" with precision greater than "double" and uses appropriate floating-point routines depending on what it discovered.

It appears that your current rusqlite branch with wasm support is using sqlite 3.43.2. Is it easy to update that and see if 3.44.0 fixes the problem?

No change. The issue happens before run-time, unfortunately.

Thanks for testing it. Didn't realize they are just performing run-time checks.
I did some research and have discovered that the wasi-sdk project releases libclang_rt as a standalone download here: https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-21
Upon inspecting that file, it's an ar archive containing a bunch of wasm objects that appear mostly ready to link. Out of the f128 functions I identified above as missing, this archive contains implementations of every function apart from __lttf2 and __gttf2. It seems that clang uses __letf2 and __getf2 instead.
It doesn't seem trivial to link that archive in during the build though in a way that correctly links all of those functions. But it's perhaps one possible way to move forward.

Oh, just noticed that is the same file as https://github.com/jedisct1/libclang_rt.builtins-wasm32.a which you mentioned in https://github.com/rusqlite/rusqlite/pull/1010#issuecomment-1774097822... Apologies.

Ok after more testing, I can confirm that the following diff resolves all of the missing imports:
diff --git a/libsqlite3-sys/build.rs b/libsqlite3-sys/build.rs
index a6b99c3..55a7488 100644
--- a/libsqlite3-sys/build.rs
+++ b/libsqlite3-sys/build.rs
@@ -291,6 +291,12 @@ mod build_bundled {
             cfg.file("sqlite3/wasm32-unknown-unknown/libc/string/strncmp.c");
             cfg.file("sqlite3/wasm32-unknown-unknown/libc/string/strrchr.c");
             cfg.file("sqlite3/wasm32-unknown-unknown/libc/string/strspn.c");
+
+            cfg.include("/home/carl/dev/llvm-project/compiler-rt/include");
+            cfg.file("/home/carl/dev/llvm-project/compiler-rt/lib/builtins/extenddftf2.c");
+            cfg.file("/home/carl/dev/llvm-project/compiler-rt/lib/builtins/comparetf2.c");
+            cfg.file("/home/carl/dev/llvm-project/compiler-rt/lib/builtins/multf3.c");
+            cfg.file("/home/carl/dev/llvm-project/compiler-rt/lib/builtins/trunctfdf2.c");
         }
         if cfg!(feature = "unlock_notify") {
             cfg.flag("-DSQLITE_ENABLE_UNLOCK_NOTIFY");

@trevyn I got something working here: https://github.com/trevyn/rusqlite/pull/1

Nice!

@trevyn I am trying to get this branch working with wasm-pack and I've been hitting some issues. I've reached out to the Rusqlite Discord, but I don't think you're in it, and your fork doesn't have any options to open issues or discussions. Is there any appropriate place to ask for help with this from someone more experienced than me? (Specifically I'm encountering rust-lld: error: --shared-memory is disallowed by sqlite3.o because it was not compiled with 'atomics' or 'bulk-memory' features. when building.)
I don't want to hijack your pull request discussion for a support request, I was just hoping there was somewhere you could point me that would be a good place to discuss this. Thanks! (And thanks for this work, this is very exciting -- I'm hoping to use flutter_rust_bridge to get the same Rust sqlite code running on my server as in native mobile apps and a web app, which would be really helpful for not having to duplicate database logic!)

I suggest moving that line of questioning to wasm-pack land. Here is a similar issue: https://github.com/rustwasm/wasm-pack/issues/1328
You'll need to figure out how to convince wasm-pack + cargo + rustc to recompile everything with the atomics and bulk-memory features in order to support shared memory. I did a bunch of investigation into this recently and it's a huge PITA (for now). I also suggest taking a look at the new wasm32-wasi-preview1-threads target which may make this easier (or harder): https://doc.rust-lang.org/rustc/platform-support/wasm32-wasi-preview1-threads.html

@carlsverre After investigating a bit, this seems to be distinct from the wasm-pack issue -- it's not about rust code, but specifically about sqlite3.o, which is produced by libsqlite3-sys. The issue seems to be that the target feature flags set for rust are not being forwarded to clang when building sqlite3.c.
I proposed a fix to @trevyn in a pull request to his fork's pull request branch (😅), not sure if that's the best approach.

FWIW, the list of supported features was pulled from https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/target_features.rs#L312 -- I'm not sure if there's a clean way to depend on rustc_target to avoid hard coding this list? (I also don't know if all wasm32 target features will map 1:1 to clang options, though the current list does -- I compared it to the clang command line documentation.)

I just wrote a test to init a DB connection and INSERT then SELECT using this branch (with latest master pulled into it).
It runs fine on non-wasm but when I ran it on wasm it throws: RuntimeError: indirect call to null. I could repro this on firefox and safari. The full stacktrace is here:
    JS exception that was thrown:
        RuntimeError: indirect call to null
        sqlite3OsFileControl@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3403]:0x3340f3
        sqlite3_file_control@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[761]:0x20d9e1
        sqlite3Pragma@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[61]:0x26e6d
        yy_reduce@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[60]:0x2454c
        sqlite3Parser@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[971]:0x23e22e
        sqlite3RunParser@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[301]:0x15b901
        sqlite3Prepare@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[277]:0x14cafc
        sqlite3LockAndPrepare@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[1029]:0x249b15
        sqlite3_prepare_v3@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3523]:0x339c56
        rusqlite::inner_connection::InnerConnection::prepare_::hc2f0a88ee06fb549@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[4084]:0x34f87a
        rusqlite::inner_connection::InnerConnection::prepare::h94bf9f3edeb66287@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[427]:0x19d8a3
        rusqlite::Connection::prepare_with_flags::h09f3557df09b0fc9@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3308]:0x32f292
        rusqlite::Connection::prepare::h310e550dfb17c830@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[4451]:0x35a312
        rusqlite::Connection::execute_batch::hea1042c16c0cd981@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[294]:0x1570c0
        rusqlite::pragma::<impl rusqlite::Connection>::pragma_update::hdec1666d01ace9c7@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[621]:0x1e5e75
        rusqlite_migration::set_user_version::h982001b4ab2782a6@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[1417]:0x28b38a
        rusqlite_migration::Migrations::goto_up::h727ad997790a6cb9@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[154]:0xe7555
        rusqlite_migration::Migrations::goto::h1a94cc5b0cbd3f29@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[207]:0x119bcf
        rusqlite_migration::Migrations::to_latest::hcecaa0df0427a54b@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[705]:0x1febfe
        db::lib_test::test::hc7c7c3310ec12cbf@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[628]:0x1e7f23
        core::ops::function::FnOnce::call_once::h8dd7fba8693501e0@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[5668]:0x370078
        wasm_bindgen_test::__rt::Context::execute_sync::{{closure}}::he71cc68df0d3c2a7@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3323]:0x32ff13
        <wasm_bindgen_test::__rt::TestFuture<F> as core::future::future::Future>::poll::{{closure}}::{{closure}}::hc25b673a04f73bb8@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3518]:0x33987e
        wasm_bindgen::convert::closures::invoke0_mut::h6e1e9c6b868d2ee7@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[4063]:0x34ed5a
        __wbg_adapter_41@http://<IP_ADDRESS>:38265/wasm-bindgen-test:337:10
        cb0@http://<IP_ADDRESS>:38265/wasm-bindgen-test:487:28
        window.__wbg_test_invoke@http://<IP_ADDRESS>:38265/:38:38
        __wbg_get_imports/imports.wbg.__wbg_wbgtestinvoke_7de5d5374a833823/<@http://<IP_ADDRESS>:38265/wasm-bindgen-test:492:30
        handleError@http://<IP_ADDRESS>:38265/wasm-bindgen-test:342:18
        __wbg_get_imports/imports.wbg.__wbg_wbgtestinvoke_7de5d5374a833823@http://<IP_ADDRESS>:38265/wasm-bindgen-test:480:76
        wasm_bindgen_test::__rt::__wbg_test_invoke::hb58221eb1bd2a29f@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[2517]:0x2fdf69
        <wasm_bindgen_test::__rt::TestFuture<F> as core::future::future::Future>::poll::{{closure}}::hf3411908db1aeefa@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3839]:0x346df8
        scoped_tls::ScopedKey<T>::set::h73e8dcd9e422f126@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3629]:0x33e690
        <wasm_bindgen_test::__rt::TestFuture<F> as core::future::future::Future>::poll::h4925da01429b92e6@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[653]:0x1ef992
        <wasm_bindgen_test::__rt::ExecuteTests as core::future::future::Future>::poll::h086a35e5c805ca10@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[184]:0x104fcd
        wasm_bindgen_test::__rt::Context::run::{{closure}}::hc9ef03a3fb10a54c@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[1576]:0x2a0982
        wasm_bindgen_futures::future_to_promise::{{closure}}::{{closure}}::h32d6024e9975e335@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[714]:0x20109e
        wasm_bindgen_futures::task::singlethread::Task::run::h184e97cc0ef1e77e@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[1510]:0x297fe8
        wasm_bindgen_futures::queue::QueueState::run_all::h4285a3205cd25e58@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[1151]:0x260bb3
        wasm_bindgen_futures::queue::Queue::new::{{closure}}::hc990aef658832399@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[4229]:0x35407f
        <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h17f3b0b306d2221f@http://<IP_ADDRESS>:38265/wasm-bindgen-test_bg.wasm:wasm-function[3349]:0x33156b
        __wbg_adapter_28@http://<IP_ADDRESS>:38265/wasm-bindgen-test:240:10
        real@http://<IP_ADDRESS>:38265/wasm-bindgen-test:203:20

where the test is:
use wasm_bindgen_test::{wasm_bindgen_test, wasm_bindgen_test_configure};
wasm_bindgen_test_configure!(run_in_browser);

#[derive(Debug, Eq, PartialEq, Clone)]
struct Example {
    pub id: i64,
    pub name: String,
}

#[wasm_bindgen_test]
#[test]
fn test() {
    let migrations = rusqlite_migration::Migrations::new(vec![rusqlite_migration::M::up(
        "CREATE TABLE example (id INT, name TEXT);",
    )]);
    let mut conn = rusqlite::Connection::open_in_memory().unwrap();
    migrations.to_latest(&mut conn).unwrap();

    let val = Example {
        id: 1,
        name: "test".into(),
    };
    conn.execute(
        "INSERT INTO example (id, name) VALUES (?, ?)",
        (val.id, val.name.clone()),
    )
    .expect("Failed to set");
    let res = conn
        .query_row(
            "SELECT id, name FROM example WHERE (id=?)",
            [val.id],
            |row| {
                Ok(Example {
                    id: row.get(0).unwrap(),
                    name: row.get(1).unwrap(),
                })
            },
        )
        .unwrap();
    assert_eq!(res, val);
}

I'm seeing this same issue as well on the latest commit of this branch.

Sorry I'm not deep enough into understanding sqlite3 to propose a fix, but I have found out that this happens when journaling is enabled. When a transaction is started a MemJournal gets opened and when step calls xFileControl, it is null because that's how sqlite3_io_methods MemJournalMethods is defined.

Hey @trevyn thanks for the PR, this branch correctly compiles to wasm32-unknown-unknown for me as well!
However, I get a disk I/O error when trying to open a connection to a file db (rusqlite::Connection::open(SQLITE_PATH)).
Did someone encountered this problem before?
I've also tried older commits from this branch but the problem persists...

Hey @trevyn thanks for the PR, this branch correctly compiles to wasm32-unknown-unknown for me as well!
However, I get a disk I/O error when trying to open a connection to a file db (rusqlite::Connection::open(SQLITE_PATH)). Did someone encountered this problem before?
I've also tried older commits from this branch but the problem persists...

IIUC, this PR only supports an in memory db.

IIUC, this PR only supports an in memory db.

Yeah, I've now found out that in order to access the filesystem you need to target wasm32-wasi.

Not for nothing, this PR is requested more frequently than any other from people in the Discord (not that that means it's requested that frequently). It doesn't appear to pull in a big chunk of libc anymore, so the previous main objection I had might be fixed now.

@thomcc is there any news regarding this? What's the plan here? Is there help needed to get this over the finish line?


Jvm target failing casting for unit tests

regression results:
jvm|interface0
jvm|interface11
jvm|interface12
jvm|interface14
jvm|interface6
jvm|interface7
jvm|named5
jvm|named7
jvm|named8

named5 part of the error:
Exception Details:
  Location:
    github_com/go2hx/go4hx/rnd/X_asInterface.__underlying__()Lstdgo/AnyInterfaceData; @71: aload_0
  Reason:
    Type 'stdgo/PointerData' (current frame, stack[2]) is not assignable to 'java/lang/Integer'

It is certainly true that stdgo/PointerData - a class with quite a few variables -  is unlikely to be assignable to java/lang/Integer.
So the question is, from which Go/Haxe statement is this obviously wrong JVM code being generated?
I can't see this rnd.go code as it is not in the main repo.

Yes you are right, and here is the code @elliott5 .
rnd.go
package main

type x int

func (x) run() {}

type i interface {
	run()
}

func main() {
	var y x = 10
	var z any = y
	z.(i).run()
}

Could you please also share the generated Haxe @PXshadow

It's working now, jvm is very specfic about casting.

Well done for finding the bug @PXshadow


docs: fix small screen by removing getting started section.

The navigation would now look like:

instead of the one in #1392
fixes #1392

Thanks!
I must defend my screen though, it's not that small :-D The problem is now fixed for that particular section of the docs, which is probably the most important one, but it's still confusing if you enter through any other seciton


Normalize protocol URIs

Resolves part of #265. PR to normalize schemas will come next. Thanks @dcrousso for pointing me in the right direction!
The general approach is: Anywhere we call MessageStore#put or MessageStore#query normalize the protocol string in the indexes/filters respective.

do the normalization in create() methods and perform message validation upon request...

Not sure what you mean by perform message validation upon request?


[PIP] Schema compatibility check

No pun intended, PIP stands for "Proposal & Implementation Plan".
Motivation
To allow an application to check that all Entities are compatible with the current database schema, on CI and/or on application startup.
Architecture
We need to introduce a standardized way to define all entities, and I imagine:
trait EntityCollection: Iterable {
    fn entity_schema(&self, db: DbBackend) -> EntitySchema {
        // this will call `create_table_from_entity` etc to construct EntitySchema
    }
}

struct EntitySchema {
    name: DynIden,
    table: TableCreateStatement,
    enums: Vec<TypeCreateStatement>,
    indices: Vec<IndexCreateStatement>,
}

// user space

#[derive(EnumIter, DeriveEntityCollection)]
enum Entities {
    Cake,
    Fruit,
}

And as such, we can have the following API:
impl Schema {
    async fn check_compatibility<C: EntityCollection>(db: &DbConn, entities: &C) -> Result<(), SchemaErrors> {
        let mut errors = Vec::new();
        // discover schema
        for entity in entities::iter() {
            check(entity.entity_schema(db), db_schema);
        }
        if errors.is_empty() {
            Ok(())
        } else {
            Err(SchemaErrors { errors })
        }
    }
}

struct SchemaErrors {
    errors: Vec<SchemaError>,
}

enum SchemaError {
    TableMissing(..),
    ColumnMissing(..),
    ColumnTypeIncompatible(..),
    ..
}

Mode of operation
Under the hood, it will discover the entire schema from the database (just like codegen) and compare it against EntitySchema.
The tricky part is that these two schema will not be exactly the same, so we should be somewhat tolerant to permutations.
The live schema can be a superset of Entity schema, i.e. there can be more tables and columns. So we should start from EntitySchema and check that 1) column exist and 2) the types are inter-operable (i.e. DateTime can work with time::DateTime or chrono::DateTime, to complicate things a bit, numeric can also work with both Decimal and BigDecimal)
The MVP don't have to check absolutely everything, but just some sanity checks in CI would be better than nothing.
Since this depends on SeaSchema, we should place this implementation in sea-orm-migration.
And we need the support of the DeriveEntityCollection macro as well as codegen to generate the Entities enum in the first place.
A bonus would be that we can return all errors instead of failing immediately.

Hi! I was thinking recently about a similar thing. For a while now Django has a feature: whenever you change your model, you can simply run its CLI django-admin makemigrations and the thing will

scan the existing entities (a.k.a. Models).
run through the existing migrations, accumulating the changes in a "virtual schema".
compare the resulting "virtual schema" with what you actually have in your models
and generate a new migration capable of performing the necessary adjustments

All this is done without any connection to a database. Django does not run the migrations within a transaction to see what happens. It does not try to compare the actual tables with anything.
Just an example (self-explanatory, I hope). Let's say I have a simple model
class MyModel(models.Model):
    name = models.CharField(max_length=10)

After running makemigrations I get a file called 0001_initial.py with the following code:
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='MyModel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10)),
            ],
        ),
    ]

Now, if I change the model by adding a new field, like so:
class MyModel(models.Model):
    name = models.CharField(max_length=10)
    age = models.IntegerField(default=1)

and launch makemigrations, Django will generate a new file, this time called 0002_mymodel_age.py containing the changes:
class Migration(migrations.Migration):

    dependencies = [
        ('<app name here>', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='mymodel',
            name='age',
            field=models.IntegerField(default=1),
        ),
    ]

This is not only an incredibly useful feature, saving both time and keeping developer from making mistakes. It can also be used to validate the migrations against the existing entities (models). Exactly what you described earlier.
I believe SeaORM can perform the same trick with some changes.
Currently all migrations use SchemaManager to make the changes, and SchemaManager runs them directly on a live DB. More specifically, a Migration creates (mostly) DB-agnostic statements (like TableCreateStatement or IndexCreateStatement). Then SchemaManager turns those statements into executable SQL and runs it through a specified DB connection.
Instead, SchemaManager can be made more flexible, capable of "running" against a "virtual database". This "virtual DB" would receive the operators directly, analyze and "execute" them, changing its internal state accordingly. One will not even need to rewrite the existing migrations.
Statements themselves (I mean things like TableCreateStatement) should provide a public interface for accessing their configuration. Currently one can only conveniently construct them, but not inspect what was constructed. Everything is pub (crate).
Doing that will both make it possible to perform the compatibility check and later to automatically generate new migrations according to the changes made to the entities. All this could even be done as a separate library, but too low-level SchemaManager and mostly private XYZStatement structs keep that from happening.

Thank you for you input, but it looks like a separate proposal indeed.
I am aware of that Django feature, but it seems to be very complex to implement.
There caveat is, if a user has a migration script in raw SQL, the feature couldn't work.
And it's always ambiguous when a column is renamed.


Payment Method "PowerPay"

Hi there
An other issue - we would have "PowerPay" (payment with invoice) as a payament option for our customers, but it does not seem to be forwarded to the payment page where the customer should choose his way of payment.
Looking forward to a solution as well.
Br's
Ralph

@3d-printerstore how did you test?
If we try, it works fine. Also the new button is there (stornieren).

Hi
Yes, you are right – it was my fault, as I didn’t checked the payment method box in the shipping methods.
But – I find it kind of strange and out of date,  to ask for a gender “Male” or “female” and just the birth of date.
Freundliche Grüsse / Salutations / Best regards
Ralph Borbeck
3D-PRINTERSTORE.CH
except ag
Weststrasse 15
CH - 8570 Weinfelden
+41 71 620 32 38
<EMAIL_ADDRESS>https://3d-printerstore.chhttps://3d-printerstore.ch/
Von: Alcpaone @.>
Gesendet: Mittwoch, 10. Januar 2024 11:03
An: pfpayments/jtl-5 @.>
Cc: 3D Printerstore @.>; Mention @.>
Betreff: Re: [pfpayments/jtl-5] Payment Method "PowerPay" (Issue #25)
@3d-printerstorehttps://github.com/3d-printerstore how did you test?
If we try, it works fine. Also the new button is there (stornieren).
image.png (view on web)https://github.com/pfpayments/jtl-5/assets/64169279/ee809b72-8156-461c-8a8b-e38a7e16a221
—
Reply to this email directly, view it on GitHubhttps://github.com/pfpayments/jtl-5/issues/25#issuecomment-1884537983, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB5CFSQNZCMHHAEFMU6LTH3YNZRM5AVCNFSM6AAAAABBUJJWQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUGUZTOOJYGM.
You are receiving this because you were mentioned.Message ID: @.***>

Yes a bit Strange because the Informationen are all there (our customers have to Register).
I would suggest to the developer, to autofill the Information if they are known and bypass this form. Anyway this implementation is less usefull then before.
the dedicated powerpay plugin always did the check in the background so that the customer only saw this payment option if available for him in the checkout of the shop. Now all customers can see this payment option, also customer that aren’t legit to use it.
this is the reason why a button to change payment method is so important and also a clear “error” message, that the customer was declined.

I wonder how the customer would get an invoice – I don’t want to test it and then receive an invoice from PowerPay 😊
Freundliche Grüsse / Salutations / Best regards
Ralph Borbeck
3D-PRINTERSTORE.CH
except ag
Weststrasse 15
CH - 8570 Weinfelden
+41 71 620 32 38
<EMAIL_ADDRESS>https://3d-printerstore.chhttps://3d-printerstore.ch/
Von: Alcpaone @.>
Gesendet: Mittwoch, 10. Januar 2024 13:53
An: pfpayments/jtl-5 @.>
Cc: 3D Printerstore @.>; Mention @.>
Betreff: Re: [pfpayments/jtl-5] Payment Method "PowerPay" (Issue #25)
Yes a bit Strange because the Informationen are all there (our customers have to Register).
I would suggest to the developer, to autofill the Information if they are known and bypass this form. Anyway this implementation is less usefull then before.
the dedicated powerpay plugin always did the check in the background so that the customer only saw this payment option if available for him in the checkout of the shop. Now all customers can see this payment option, also customer that aren’t legit to use it.
this is the reason why a button to change payment method is so important and also a clear “error” message, that the customer was declined.
—
Reply to this email directly, view it on GitHubhttps://github.com/pfpayments/jtl-5/issues/25#issuecomment-1884795967, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB5CFSSGL5FXVDJTA6BI2BTYN2FKRAVCNFSM6AAAAABBUJJWQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUG44TKOJWG4.
You are receiving this because you were mentioned.Message ID: @.***>

@3d-printerstore you can't just use it. Your company needs a contract with powerpay. After that your option is ready in the postfinance checkout and you can activate the payment option. Powerpay sends the invoice over email. All Details and how to's are in the paperwork you have to sign ;-) Works fine.

ok – well, we have the contract alright, but it just looked so “off” when a customer needs to put in Gender & BirthDate
Freundliche Grüsse / Salutations / Best regards
Ralph Borbeck
3D-PRINTERSTORE.CH
except ag
Weststrasse 15
CH - 8570 Weinfelden
+41 71 620 32 38
<EMAIL_ADDRESS>https://3d-printerstore.chhttps://3d-printerstore.ch/
Von: Alcpaone @.>
Gesendet: Mittwoch, 10. Januar 2024 14:38
An: pfpayments/jtl-5 @.>
Cc: 3D Printerstore @.>; Mention @.>
Betreff: Re: [pfpayments/jtl-5] Payment Method "PowerPay" (Issue #25)
@3d-printerstorehttps://github.com/3d-printerstore you can't just use it. Your company needs a contract with powerpay. After that your option is ready in the postfinance checkout and you can activate the payment option. Powerpay sends the invoice over email. All Details and how to's are in the paperwork you have to sign ;-) Works fine.
—
Reply to this email directly, view it on GitHubhttps://github.com/pfpayments/jtl-5/issues/25#issuecomment-1884867566, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB5CFSX6SQAPZJ6AUUUXA23YN2KT5AVCNFSM6AAAAABBUJJWQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUHA3DONJWGY.
You are receiving this because you were mentioned.Message ID: @.***>

ok, then you should know how your customers get the invoice, you signed the contract ;-)
anyway, yes it is not neccessary if the informations are there. If they aren't, they nedd this for verfification.
Do you ask your customers about birthday and gender?

No, we would never ask our customers for their birthday or gender  - birthday would be an option for congratulating and giving out vouchers, but gender is really outdated.
Freundliche Grüsse / Salutations / Best regards
Ralph Borbeck
3D-PRINTERSTORE.CH
except ag
Weststrasse 15
CH - 8570 Weinfelden
+41 71 620 32 38
<EMAIL_ADDRESS>https://3d-printerstore.chhttps://3d-printerstore.ch/
Von: Alcpaone @.>
Gesendet: Mittwoch, 10. Januar 2024 15:08
An: pfpayments/jtl-5 @.>
Cc: 3D Printerstore @.>; Mention @.>
Betreff: Re: [pfpayments/jtl-5] Payment Method "PowerPay" (Issue #25)
ok, then you should know how your customers get the invoice, you signed the contract ;-)
anyway, yes it is not neccessary if the informations are there. If they aren't, they nedd this for verfification.
Do you ask your customers about birthday and gender?
—
Reply to this email directly, view it on GitHubhttps://github.com/pfpayments/jtl-5/issues/25#issuecomment-1884918041, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB5CFSSOPATTQTCTGTL53A3YN2OFZAVCNFSM6AAAAABBUJJWQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUHEYTQMBUGE.
You are receiving this because you were mentioned.Message ID: @.***>

@3d-printerstore "but gender is really outdated." maybe, but this is something you have to deal if you like to offer invoice without taking the risk of payment loss with powerpay. Let me know if you find a swiss company, that don't ask for that.

I know , but dont‘ think I have the time looking for an another one 😉
Freundliche Grüsse / Salutations / Best regards
Ralph Borbeck
3D-PRINTERSTORE.CH
except ag
Weststrasse 15
CH - 8570 Weinfelden
+41 71 620 32 38
<EMAIL_ADDRESS>https://3d-printerstore.chhttps://3d-printerstore.ch/
Von: Alcpaone @.>
Gesendet: Donnerstag, 11. Januar 2024 09:35
An: pfpayments/jtl-5 @.>
Cc: 3D Printerstore @.>; Mention @.>
Betreff: Re: [pfpayments/jtl-5] Payment Method "PowerPay" (Issue #25)
@3d-printerstorehttps://github.com/3d-printerstore "but gender is really outdated." maybe, but this is something you have to deal if you like to offer invoice without taking the risk of payment loss with powerpay. Let me know if you find a swiss company, that don't ask for that.
—
Reply to this email directly, view it on GitHubhttps://github.com/pfpayments/jtl-5/issues/25#issuecomment-1886619674, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB5CFSV5DZE2EXD6DL7ENALYN6P4TAVCNFSM6AAAAABBUJJWQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBWGYYTSNRXGQ.
You are receiving this because you were mentioned.Message ID: @.***>

just for information if someone struggles about the settings for powerpay.
Set this option like below in the postfinance checkout / Einstellungen / Zahlung / Zahlungsoptionen / Verarbeiter
Thats the same as the "old" plugins has done before. Customers see only payment option with invoice if credit check is ok.

update: the function for pre-checking creditworthiness does not work in plugin version 1.0.20. As usual, it is not known when this important function will be fixed.

PowerPay told me to check the box "Nach der Wahl der Zahlungsmethode".
The problem you'll have then in the JTL Wawi , in the case of a declined customer, is an order which is not payed, but with "invoice" for a customer who would only get "prepayment"
Had to make a workaround with a Workflow which double checks those and change them to "Prepayment* - or does anybody know how to get those PowerPay orders come into the JTL Wawi as PowerPay and not as "invoice"?

hi @Alcpaone @3d-printerstore , could you provide us how to reproduce the problem from the setup and what is happening vs what you expect to happen ?

@thibault-mambour
Hi Thibault
that depends on what we are talking about here.

credit check BEFORE payment method selection, this problem is open as a separate issue, see #31 -> very important. The available options in the checkout obviously do not work at the moment.

additional query of the date of birth and gender:
If this information is passed from the Online Shop to Checkout (gender, date of birth), no additional query should appear.
If the data is not transferred because not all stores request this information, the additional query should appear as is currently the case.

hi @Alcpaone , do you think you could provide some screen recording, so it would be easier for us to understand ?

@thibault-mambour I’m not Shure what you like to see in the recording. Before a customer can pay (with Powerpay) at the moment he has to fill his data again in the screen from your plugin. See the screenshot:

All information requested are already provided from the customer to the shop. If the information are available, the form should not appear. If the information are not provided, then the form hast to show up.
please explain exactly what you like to see, i will do that for you asap.
ps: sorry, looks like I missed your message a few days ago. Next time if you don’t get answer in one day send me please a email. You already know my adress.

Hi @Alcpaone , in https://github.com/pfpayments/jtl-5/issues/25#issuecomment-1959498496, you mention 2 points. For the point 1, could you provide a bit more context on what you are expecting from the plugin ? Or some explanation on how you are using it

@thibault-mambour inserted answer in #31 where it belongs.

Hi there
Can you please look at this again – I can’t recall which issue number it was, but this error was once already solved, but with the newest update it has come back
Discounts are not deducted, but added to the payment amount !!
@.***
Freundliche Grüsse / Salutations / Best regards
Ralph Borbeck
3D-PRINTERSTORE.CH
except ag
Weststrasse 15
CH - 8570 Weinfelden
+41 71 620 32 38
<EMAIL_ADDRESS>https://3d-printerstore.chhttps://3d-printerstore.ch/

hi @3d-printerstore can you check with 1.0.23, it should be fixed there

@ thibault-mambour
Looks like the discount is working again - thanks
Freundliche Grüsse / Salutations / Best regards
Ralph Borbeck
3D-PRINTERSTORE.CH
except ag
Weststrasse 15
CH - 8570 Weinfelden
+41 71 620 32 38
<EMAIL_ADDRESS>https://3d-printerstore.chhttps://3d-printerstore.ch/
Von: thibault-mambour @.>
Gesendet: Dienstag, 5. März 2024 14:44
An: pfpayments/jtl-5 @.>
Cc: 3D Printerstore @.>; Mention @.>
Betreff: Re: [pfpayments/jtl-5] Payment Method "PowerPay" (Issue #25)
hi @3d-printerstorehttps://github.com/3d-printerstore can you check with 1.0.23, it should be fixed there
—
Reply to this email directly, view it on GitHubhttps://github.com/pfpayments/jtl-5/issues/25#issuecomment-1978806199, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB5CFSROXAJNUY26FBYRGOLYWXD3BAVCNFSM6AAAAABBUJJWQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZYHAYDMMJZHE.
You are receiving this because you were mentioned.Message ID: @.***>

@PAO1908CH done? if so, please close the issue so we can all see the remaining tasks. Thank you!

@PAO1908CH done? if so, please close the issue so we can all see the remaining tasks. Thank you!


funnily enough, the matrix link to permaweb.io's matrix server is not permanent

https://riot.permaweb.io/#/room/#orbitdb:permaweb.io doesn't work anymore, how can I join the matrix?

https://app.element.io/#/room/#orbitdb_Lobby:gitter.im from the org readme

thx


WD Task: Re-implement in a more robust way

The task now lives for the entire application duration, even if the
application missed checking-in in time.
Also the WD code is greatly simplified
Signed-off-by: Avi Shukron<EMAIL_ADDRESS>

@Reznic ?

@Reznic ?

Hi,
We tried this before.
the sleeps for large amounts of times greatly reduce our fps, and sampling rate.
That was solved by using async sleep.
There is another way, by comparing timestamps in each interation,
but it's ugly, maybe heavy to add many comparisons each interval,
and also we'll have to do it twice - for the sleep in the wd driver, and the sleep in the wd task.
So unless we choose the ugly timestamp comparisons,
we have no choice but use threads for the WD - the previous threads.Timer solution

That doesn't make any sense now since the WD is in its own task.
I ran the app with my changes. No lag and no FPS degredation

That doesn't make any sense now since the WD is in its own task.
I ran the app with my changes. No lag and no FPS degredation

Ok
but we need to check on raspi.
And I recommend profiling the app with cProfile. (can be done on laptop as well)
It shows you exactly how much time each method takes.
We did it in the past, so call me if you'l have questions


Failed to import from contentlayer/generated with pnpm

I'm looking more for pointers than a fix because following the quick start works fine (even with pnpm), so this might be my own issue. I'm getting this error with pnpm, yarn works fine though…

I went through the configs multiple times, and everything seems to be fine, so I can't really put my hand on the issue…
Running pnpm contentlayer build works fine though, but once you delete .contentlayer folder it doesn't get automatically generated again.
You can see my contentlayer branch here https://github.com/ahmedelgabri/gabri.me/tree/contentLayer

Thanks, @schickling 👍🏼


Create radix_sort.py

It seems like there are no radix_sort in the sort file, so I added it.

Pull Request Test Coverage Report for Build 341

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 91.539%

Totals

Change from base Build 340:
0.0%

Covered Lines:
2748

Relevant Lines:
3002

💛  - Coveralls

I change test_sort too!

Thanks for your comment, I updated radix_sort and, update README files.


chore: Remove app_plugin_loader Gradle plugin (Android)

Hi everyone,
In the app, we have the following warning:
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

There's just a few things to do the migration

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 9.51%. Comparing base (4d9c7fc) to head (f3f743d).
Report is 78 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5173      +/-   ##
==========================================
- Coverage     9.54%   9.51%   -0.04%
==========================================
  Files          325     327       +2
  Lines        16411   16579     +168
==========================================
+ Hits          1567    1578      +11
- Misses       14844   15001     +157

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Only use one default process name

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#1464
#1463  👈 (View in Graphite)
#1462
#1461
#1440
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Merge activity

Nov 25, 6:16 PM EST: A user started a stack merge that includes this pull request via Graphite.


Documentation: build warnings

Following warnings are output on build:
reading sources... [100%] lib/reference/handlers/index
/home/peter/PycharmProjects/starlite/docs/lib/reference/handlers/index.rst:5: WARNING: toctree contains reference to nonexisting document 'lib/reference/handlers/asgi'
/home/peter/PycharmProjects/starlite/docs/lib/reference/handlers/index.rst:5: WARNING: toctree contains reference to nonexisting document 'lib/reference/handlers/http'
/home/peter/PycharmProjects/starlite/docs/lib/reference/handlers/index.rst:5: WARNING: toctree contains reference to nonexisting document 'lib/reference/handlers/websocket'
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/peter/PycharmProjects/starlite/docs/benchmarks.rst: WARNING: document isn't included in any toctree
/home/peter/PycharmProjects/starlite/docs/lib/reference/handlers/asgi_handlers.rst: WARNING: document isn't included in any toctree
/home/peter/PycharmProjects/starlite/docs/lib/reference/handlers/http_handlers.rst: WARNING: document isn't included in any toctree
/home/peter/PycharmProjects/starlite/docs/lib/reference/handlers/websocket_handlers.rst: WARNING: document isn't included in any toctree

There's a few extra warnings that show if building docs from scratch:
WARNING: missing attribute mentioned in :members: option: module starlite.connection.base, attribute User
WARNING: missing attribute mentioned in :members: option: module starlite.connection.base, attribute Auth
WARNING: missing attribute mentioned in :members: option: module starlite.connection.base, attribute Handler
/home/peter/PycharmProjects/starlite/starlite/contrib/htmx/request.py:docstring of starlite.contrib.htmx.request:1: WARNING: Inline substitution_reference start-string without end-string.
WARNING: missing attribute mentioned in :members: option: module starlite.testing, attribute WebSocketTestSession

(excludes missing attribute __init__ warnings which is a known issue)