Skip to content

Avoid "cannot open" messages #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

swinkels
Copy link

@swinkels swinkels commented Jan 28, 2023

This pull request addresses ticket #17 , that reports that the user sees many cannot open: "''" messages.

This issue is caused by a change in SQLite. To avoid any initialization when SQLite runs a command, dash-docs calls SQlite with the -init option. For SQLite versions older than 3.34.0, you would use arguments -init "". As of that version, SQLite reports the error that file '" doesn't exist and you need to pass the null device instead.

This pull request checks the SQLite version in-use and provides the appropriate version of the arguments.

This commit removes the expression to determine the null device and uses the
existing Elisp variable null-device instead.

This commit also fixes a naming error with one of the unit tests. There were two
unit tests with the same name so one of them wasn't picked up...
@swinkels swinkels changed the title Avoid spurious "cannot open" messages Avoid "cannot open" messages Jan 28, 2023
@swinkels
Copy link
Author

swinkels commented Jan 28, 2023

I'm closing this pull request as the solution is somewhat overengineered :). It turns out that pre-3.34.0 versions of SQLite also accept the null device, which makes the change a lot less elaborate. See pull request #11 for a one-line change with the same result :). In any case, I learned something from it.

@swinkels swinkels closed this Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant