{"id": 572254103, "node_id": "MDExOlB1bGxSZXF1ZXN0NTcyMjU0MTAz", "number": 1223, "state": "closed", "locked": 0, "title": "Add compile option to Dockerfile to fix failing test (fixes #696)", "user": {"value": 7476523, "label": "bobwhitelock"}, "body": "This test was failing when run inside the Docker container: `test_searchable[/fixtures/searchable.json?_search=te*+AND+do*&_searchmode=raw-expected_rows3]`,\r\n\r\nwith this error:\r\n\r\n```\r\n def test_searchable(app_client, path, expected_rows):\r\n response = app_client.get(path)\r\n> assert expected_rows == response.json[\"rows\"]\r\nE AssertionError: assert [[1, 'barry c...sel', 'puma']] == []\r\nE Left contains 2 more items, first extra item: [1, 'barry cat', 'terry dog', 'panther']\r\nE Full diff:\r\nE + []\r\nE - [[1, 'barry cat', 'terry dog', 'panther'],\r\nE - [2, 'terry dog', 'sara weasel', 'puma']]\r\n```\r\n\r\nThe issue was that the version of sqlite3 built inside the Docker container was built with FTS3 and FTS4 enabled, but without the\r\n`SQLITE_ENABLE_FTS3_PARENTHESIS` compile option passed, which adds support for using `AND` and `NOT` within `match` expressions (see https://sqlite.org/fts3.html#compiling_and_enabling_fts3_and_fts4 and https://www.sqlite.org/compile.html).\r\n\r\nWithout this, the `AND` used in the search in this test was being interpreted as a literal string, and so no matches were found. Adding this compile option fixes this.\r\n\r\n---\r\n\r\nI actually ran into this issue because the same test was failing when I ran the test suite on my own machine, outside of Docker, and so I eventually tracked this down to my system sqlite3 also being compiled without this option.\r\n\r\nI wonder if this is a sign of a slightly deeper issue, that Datasette can silently behave differently based on the version and compilation of sqlite3 it is being used with. On my own system I fixed the test suite by running `pip install pysqlite3-binary`, so that this would be picked up instead of the `sqlite` package, as this seems to be compiled using this option, . Maybe using `pysqlite3-binary` could be installed/recommended by default so a more deterministic version of sqlite is used? Or there could be some feature detection done on the available sqlite version, to know what features are available and can be used/tested?", "created_at": "2021-02-12T03:38:05Z", "updated_at": "2021-03-07T12:01:12Z", "closed_at": "2021-03-07T07:41:17Z", "merged_at": "2021-03-07T07:41:17Z", "merge_commit_sha": "d0fd833b8cdd97e1b91d0f97a69b494895d82bee", "assignee": null, "milestone": null, "draft": 0, "head": "d1cd1f259c699fab3af01c4aa90035ed0242471a", "base": "9603d893b9b72653895318c9104d754229fdb146", "author_association": "CONTRIBUTOR", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1223", "merged_by": null, "auto_merge": null} {"id": 587332473, "node_id": "MDExOlB1bGxSZXF1ZXN0NTg3MzMyNDcz", "number": 1252, "state": "closed", "locked": 0, "title": "Add back styling to lists within table cells (fixes #1141)", "user": {"value": 7476523, "label": "bobwhitelock"}, "body": "This overrides the Datasette reset - see https://github.com/simonw/datasette/blob/d0fd833b8cdd97e1b91d0f97a69b494895d82bee/datasette/static/app.css#L35-L38 - to add back the default styling of list items displayed within Datasette table cells.\r\n\r\nFollowing this change, the same content as in the original issue looks like this:\r\n\r\n![2021-03-09_02:57:32](https://user-images.githubusercontent.com/7476523/110411982-63e5ae80-8083-11eb-9b5c-e5dc825073e2.png)\r\n", "created_at": "2021-03-09T03:00:57Z", "updated_at": "2021-03-29T00:14:04Z", "closed_at": "2021-03-29T00:14:04Z", "merged_at": "2021-03-29T00:14:04Z", "merge_commit_sha": "e72397d65b06b019521b6411243687464ac8d8ca", "assignee": null, "milestone": null, "draft": 0, "head": "d22aa32cd9c0f798bcab917cc2024a371b4c0069", "base": "d0fd833b8cdd97e1b91d0f97a69b494895d82bee", "author_association": "CONTRIBUTOR", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1252", "merged_by": null, "auto_merge": null}