Last active
August 29, 2015 14:16
-
-
Save jaytaph/a4c18c900b9b3c98f112 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
search paths: [['.', './modules', '/usr/share/saffire/modules']] | |
/wwwroot/main.sf (namespace: '::') | |
---------------------------------------------- | |
import io; | |
import framework; | |
import notexisting; | |
io.print("hello world"); | |
framework.run(); | |
---------------------------------------------- | |
* import io; (import io class as alias io from module io) | |
* module io is an UQCN, so add namespace to it to create FQCN: ::io | |
* ::io is resolved to `io.sf` | |
* checking paths: ./io.sf, ./modules/io.sf, /usr/share/saffire/modules/io.sf | |
* cannot be resolved. | |
* change module "io" UCQN into the fallback module prefix: ::saffire::io | |
* ::saffire::io is resolved to `saffire/io.sf` | |
* checking paths: ./saffire/io.sf, ./modules/saffire/io.sf, /usr/share/saffire/modules/saffire/io.sf (found) | |
* resolved | |
* import framework; (import framework class as alias framework from module framework) | |
* module framework is an UQCN, so add namespace to it to create FQCN: ::framework | |
* ::framework is resolved to `framework.sf` | |
* checking paths: ./framework.sf, ./modules/framework.sf (found) | |
* resolved. | |
* import notexisting; (import notexisting class as alias notexisting from module notexisting) | |
* module notexisting is an UQCN, so add namespace to it to create FQCN: ::notexisting | |
* ::notexisting is resolved to `notexisting.sf` | |
* checking paths: ./notexisting.sf, ./modules/notexisting.sf, /usr/share/saffire/modules/notexisting.sf | |
* cannot be resolved. | |
* change module "notexisting" UCQN into the fallback module prefix: ::saffire::notexisting | |
* ::saffire::notexisting is resolved to `saffire/notexisting.sf` | |
* checking paths: ./saffire/notexisting.sf, ./modules/saffire/notexisting.sf, /usr/share/saffire/modules/saffire/notexisting.sf | |
* cannot be resolved. | |
* no more fallbacks. Throw "resolveException" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Directory layout: | |
./modules/framework.sf | |
./modules/framework/http.sf | |
./modules/framework/http/request.sf | |
./modules/framework/http/response.sf | |
/wwwroot/main.sf: | |
--------------------------------------------------------- | |
import framework; | |
import framework::http; | |
import framework::http::request; | |
--------------------------------------------------------- | |
./modules/framework.sf: | |
--------------------------------------------------------- | |
import http; | |
import http::request; | |
--------------------------------------------------------- | |
OR | |
--------------------------------------------------------- | |
import framework::http; | |
import framework::http::request; | |
--------------------------------------------------------- | |
./modules/framework/http.sf: | |
--------------------------------------------------------- | |
import request; | |
--------------------------------------------------------- | |
OR | |
--------------------------------------------------------- | |
import http::request; | |
--------------------------------------------------------- | |
OR | |
--------------------------------------------------------- | |
import framework::http::request; | |
--------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment