Skip to content

Early error on missing import #4

Description

@bmeck

I was unable to figure out the full workflow of xsl to run it without mcconfig quickly, but it seems to not give an error at compile/link time about missing a dependency:

manifest.json

{
	"include": "$(MODDABLE)/examples/manifest_base.json",
	"modules": {
		"*": [
			"./main"
		]
	},
}

main.js

import {message} from "dep";
trace(message + "\n");

dep.js

export const message = "Hello world!";

Will compile "successfully" using mcconfig -d -m -p mac with the output:

> mcconfig -d -m -p mac
# xsl modules
# mcrez resources
# cc mc.resources.c
# cc mc.xs.c
# ld mc.so
> echo $?
0

This error is hidden until runtime as seen in xsbug:

screen shot 2017-12-01 at 1 58 09 pm

The .xsb files contain enough information to provide an early error, but I am unclear on xsl's internals to patch it to output such an error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions