RejectedSoftware Forums

Sign up

Module N which cannot be read

Hello,

I'm new to D and all the libraries I try to use I have no success at all (in my case below I'm using sqlited)

Executing "dub list" I got the following:

Packages present in the system and known to dub:
colorize ~master: C:\Users\Ricardo\AppData\Roaming\dub\packages\colorize-master\colorize\......

sqlite-d ~master: C:\Users\Ricardo\AppData\Roaming\dub\packages\sqlite-d-master\sqlite-d\
x11 1.0.15: C:\Users\Ricardo\AppData\Roaming\dub\packages\x11-1.0.15\x11\

When I try to run the code, I got the following error:

compiling C:...\Projects\temp2.d
C:\Users\Alfred\Dropbox\Dlang\Projects\temp2.d(8,8): Error: module sqlited is in file 'sqlited.d' which cannot be read
import path[0] = C:\D\dmd2\src\phobos
import path[1] = C:\D\dmd2\src\druntime\import
import path[2] = C:\Users\Alfred\AppData\Roaming\dub\packages\colorize-master\colorize\source
import path[3] = C:\Users\Alfred\AppData\Roaming\dub\packages\sqlite-d-master\sqlite-d
import path[4] = C:\Users\Alfred\AppData\Roaming\dub\packages\d2sqlite3-master\d2sqlite3\source
import path[5] = C:\D\dmd2\windows\bin....\src\phobos
import path[6] = C:\D\dmd2\windows\bin....\src\druntime\import
error: the process (dmd) has returned the signal 1
C:...\Projects\temp2.d has not been compiled

Please, can you help me out ?
What Am I doing wrong ?

Cheers, AN

module test;

//          Copyright Stefan Koch 2015 - 2018.
// Distributed under the Boost Software License, Version 1.0.
//    (See accompanying file LICENSE.md or copy at
//          http://www.boost.org/LICENSE_1_0.txt)

import sqlited;
import misc;
import sqlstuff;

static immutable long_create_table =
q{CREATE TABLE `hey`	INTEGER,
	`Field2`	INTEGER
)};
static immutable test_s3db = cast(immutable)Database(cast(immutable ubyte[]) import("test.s3db"));
static immutable Database.MasterTableSchema[] schemas = readRows!(r => r.deserialize!(Database.MasterTableSchema))(test_s3db.rootPage, test_s3db.pages);
static assert(schemas[2].sql==long_create_table);

import frail_sql_parser;

static assert (parseCreateTable(
	q{CREATE TABLE spatial_ref_sys (
		srid INTEGER NOT NULL PRIMARY KEY,
		auth_name VARCHAR(256) NOT NULL,
		auth_srid INTEGER NOT NULL,
		ref_sys_name VARCHAR(256),
		proj4text VARCHAR(2048) NOT NULL)}
	) == TableInfo("spatial_ref_sys", [
			ColumInfo("srid", "INTEGER", true, true),
			ColumInfo("auth_name", "VARCHAR(256)", false, true),
			ColumInfo("auth_srid", "INTEGER", false, true),
			ColumInfo("ref_sys_name","VARCHAR(256)",false),
			ColumInfo("proj4text","VARCHAR(2048)", false, true),
	])
);
static assert(parseCreateTable(long_create_table) == TableInfo("hey", "INTEGER"), ColumInfo("Field2", "INTEGER")]));

static assert(parseCreateTable(
q{CREATE TABLE Towns (
				PK_UID INTEGER PRIMARY KEY AUTOINCREMENT,
				Name TEXT,
				Peoples INTEGER,
				LocalCounc INTEGER,
				County INTEGER,
				Region INTEGER, "Geometry" POINT)
}
	) == TableInfo("Towns", [
		ColumInfo("PK_UID", "INTEGER", true, false, false, true),
		ColumInfo("Name", "TEXT"),
		ColumInfo("Peoples", "INTEGER"),
		ColumInfo("LocalCounc", "INTEGER"),
		ColumInfo("County", "INTEGER"),
		ColumInfo("Region", "INTEGER"),
		ColumInfo("Geometry", "POINT")
	])
);

Re: Module N which cannot be read

On Tue, 01 Nov 2016 21:54:51 GMT, Alfred Newman wrote:

import path[2] = C:\Users\Alfred\AppData\Roaming\dub\packages\colorize-master\colorize\source
import path[3] = C:\Users\Alfred\AppData\Roaming\dub\packages\sqlite-d-master\sqlite-d
import path[4] = C:\Users\Alfred\AppData\Roaming\dub\packages\d2sqlite3-master\d2sqlite3\source

Hi Alfred,
obviously there is missing '/source' folder suffix at the end of the import path (c/f the other two). Probably run dub add-local with this suffix appended to the package path once again.

Cheers,
Ľudovít

Re: Module N which cannot be read

On Wed, 02 Nov 2016 07:56:25 GMT, Ľudovít Lučenič wrote:

On Tue, 01 Nov 2016 21:54:51 GMT, Alfred Newman wrote:

import path[2] = C:\Users\Alfred\AppData\Roaming\dub\packages\colorize-master\colorize\source
import path[3] = C:\Users\Alfred\AppData\Roaming\dub\packages\sqlite-d-master\sqlite-d
import path[4] = C:\Users\Alfred\AppData\Roaming\dub\packages\d2sqlite3-master\d2sqlite3\source

Hi Alfred,
obviously there is missing '/source' folder suffix at the end of the import path (c/f the other two). Probably run dub add-local with this suffix appended to the package path once again.

Cheers,
Ľudovít

I'd say it looks like something went wrong when getting the sqlite-d package. My first try would be to dub remove sqlite-d and see if that fixes it.