{"action":"closed","issue":{"url":"https://api.github.com/repos/intersystems-community/isc-dev/issues/9","repository_url":"https://api.github.com/repos/intersystems-community/isc-dev","labels_url":"https://api.github.com/repos/intersystems-community/isc-dev/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/intersystems-community/isc-dev/issues/9/comments","events_url":"https://api.github.com/repos/intersystems-community/isc-dev/issues/9/events","html_url":"https://github.com/intersystems-community/isc-dev/issues/9","id":364905795,"node_id":"MDU6SXNzdWUzNjQ5MDU3OTU=","number":9,"title":"Initial load based on instructions has a compilation error","user":{"login":"timleavitt","id":9937026,"node_id":"MDQ6VXNlcjk5MzcwMjY=","avatar_url":"https://avatars3.githubusercontent.com/u/9937026?v=4","gravatar_id":"","url":"https://api.github.com/users/timleavitt","html_url":"https://github.com/timleavitt","followers_url":"https://api.github.com/users/timleavitt/followers","following_url":"https://api.github.com/users/timleavitt/following{/other_user}","gists_url":"https://api.github.com/users/timleavitt/gists{/gist_id}","starred_url":"https://api.github.com/users/timleavitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timleavitt/subscriptions","organizations_url":"https://api.github.com/users/timleavitt/orgs","repos_url":"https://api.github.com/users/timleavitt/repos","events_url":"https://api.github.com/users/timleavitt/events{/privacy}","received_events_url":"https://api.github.com/users/timleavitt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-28T14:11:01Z","updated_at":"2018-10-02T13:46:16Z","closed_at":"2018-10-02T13:46:16Z","author_association":"NONE","body":"I need to call ImportDir twice for it to work properly. There's a compilation error the first time around because a generator method can't call another method in the class being compiled.\r\n\r\nTypically the solution in such a case is to move the method to a separate class with a [System] level set so that it is fully compiled before it is needed in the generator method.\r\n```\r\nDEMO>d $System.OBJ.DeletePackage(\"dev\")\r\n \r\nDeleting class dev.code\r\nDeleting class dev.deepsee\r\nDeleting class dev.diff.gitHub\r\nDeleting class dev.diff.gitLocal\r\nDeleting class dev.diff.utils\r\nDEMO>do $System.OBJ.ImportDir(dir,\"*.xml;*.cls;*.mac;*.int;*.inc;*.dfi\",\"cuk\",,1)\r\n \r\nLoad of directory started on 09/28/2018 10:08:27 '*.xml;*.cls;*.mac;*.int;*.inc;*.dfi'\r\n \r\nLoading file C:\\Users\\tleavitt\\Documents\\GitHub\\isc-dev\\cls\\dev\\deepsee.cls as udl\r\nLoading file C:\\Users\\tleavitt\\Documents\\GitHub\\isc-dev\\cls\\dev\\code.cls as udl\r\nLoading file C:\\Users\\tleavitt\\Documents\\GitHub\\isc-dev\\cls\\dev\\diff\\gitHub.cls as udl\r\nLoading file C:\\Users\\tleavitt\\Documents\\GitHub\\isc-dev\\cls\\dev\\diff\\gitLocal.cls as udl\r\nLoading file C:\\Users\\tleavitt\\Documents\\GitHub\\isc-dev\\cls\\dev\\diff\\utils.cls as udl\r\n \r\nCompilation started on 09/28/2018 10:08:28 with qualifiers 'cuk'\r\nCompiling 5 classes, using 5 worker jobs\r\nCompiling class dev.diff.gitLocal\r\nCompiling class dev.deepsee\r\nCompiling class dev.diff.gitHub\r\nCompiling class dev.diff.utils\r\nCompiling class dev.code\r\nERROR #5002: Cache error: <CLASS DOES NOT EXIST>init+2^dev.code.G1 *dev.code\r\n  > ERROR #5490: Error running generator for method 'init:dev.code'\r\nERROR: dev.code.G1.int(init+2) : <CLASS DOES NOT EXIST> :  q:##class(dev.code).workdir()=\"\"\r\nERROR: dev.code.cls(init) of generated code\r\n    > ERROR #5030: An error occurred while compiling class 'dev.code'\r\nCompiling routine dev.diff.utils.1\r\nCompiling routine dev.diff.gitHub.1\r\nCompiling routine dev.diff.gitLocal.1\r\nCompiling routine dev.code.1\r\nCompiling routine dev.deepsee.1\r\nDetected 1 errors during compilation in 0.029s.\r\n \r\nERROR #5002: Cache error: <CLASS DOES NOT EXIST>init+2^dev.code.G1 *dev.code\r\n  > ERROR #5490: Error running generator for method 'init:dev.code'\r\nERROR: dev.code.G1.int(init+2) : <CLASS DOES NOT EXIST> :  q:##class(dev.code).workdir()=\"\"\r\nERROR: dev.code.cls(init) of generated code\r\n    > ERROR #5030: An error occurred while compiling class 'dev.code'\r\nDetected 1 errors during load.\r\n \r\nDEMO>do $System.OBJ.ImportDir(dir,\"*.xml;*.cls;*.mac;*.int;*.inc;*.dfi\",\"cuk\",,1)\r\n \r\nLoad of directory started on 09/28/2018 10:08:29 '*.xml;*.cls;*.mac;*.int;*.inc;*.dfi'\r\n \r\nLoading file C:\\Users\\tleavitt\\Documents\\GitHub\\isc-dev\\cls\\dev\\diff\\utils.cls as udl\r\nLoading file C:\\Users\\tleavitt\\Documents\\GitHub\\isc-dev\\cls\\dev\\deepsee.cls as udl\r\nLoading file C:\\Users\\tleavitt\\Documents\\GitHub\\isc-dev\\cls\\dev\\code.cls as udl\r\nLoading file C:\\Users\\tleavitt\\Documents\\GitHub\\isc-dev\\cls\\dev\\diff\\gitHub.cls as udl\r\nLoading file C:\\Users\\tleavitt\\Documents\\GitHub\\isc-dev\\cls\\dev\\diff\\gitLocal.cls as udl\r\n \r\nCompilation started on 09/28/2018 10:08:29 with qualifiers 'cuk'\r\nClass dev.deepsee is up-to-date.\r\nClass dev.diff.gitHub is up-to-date.\r\nClass dev.diff.gitLocal is up-to-date.\r\nClass dev.diff.utils is up-to-date.\r\nCompiling class dev.code\r\nCompiling routine dev.code.1\r\nCompilation finished successfully in 0.017s.\r\n \r\nLoad finished successfully.\r\n```"}}
{"actor":{"display_login":"gevorg95"}}