{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/4457","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/4457/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/4457/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/4457/events","html_url":"https://github.com/nim-lang/Nim/issues/4457","id":164065106,"number":4457,"title":"Compile time file reading/writing is broken when cross compiling (especially with standalone targets)","user":{"login":"Jeff-Ciesielski","id":759677,"avatar_url":"https://avatars.githubusercontent.com/u/759677?v=3","gravatar_id":"","url":"https://api.github.com/users/Jeff-Ciesielski","html_url":"https://github.com/Jeff-Ciesielski","followers_url":"https://api.github.com/users/Jeff-Ciesielski/followers","following_url":"https://api.github.com/users/Jeff-Ciesielski/following{/other_user}","gists_url":"https://api.github.com/users/Jeff-Ciesielski/gists{/gist_id}","starred_url":"https://api.github.com/users/Jeff-Ciesielski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jeff-Ciesielski/subscriptions","organizations_url":"https://api.github.com/users/Jeff-Ciesielski/orgs","repos_url":"https://api.github.com/users/Jeff-Ciesielski/repos","events_url":"https://api.github.com/users/Jeff-Ciesielski/events{/privacy}","received_events_url":"https://api.github.com/users/Jeff-Ciesielski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-06T12:33:17Z","updated_at":"2016-07-06T15:12:36Z","closed_at":null,"body":"A few problems here:\r\nUnfortunately, it appears that the separation of host and target gets eliminated in the standard library at compile time (which I guess sort of makes sense). However, on a standalone target, this means you can no longer `import os` as it will blow up due to undefined symbols.  ospaths is also unavailable due to an `invalid pragma: rtl` issue. \r\n\r\nWorking around the ospaths issue (by including \"system/inclrtl\" on standalone builds), a nasty side effect comes to light: paths can no longer be reliably constructed as the standard library has no way to detect what os is building it. \r\n\r\nIf one sticks with unix style paths it *technically* works as windows will accept them, but this is a workaround rather than a proper solution.\r\n\r\nAraq has mentioned the need for something like 'static import', but I'm curious if there are other thoughts on this as it's a relatively irritating impediment when trying to build embedded system friendly bindings to existing C code."},"comment":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/comments/230803230","html_url":"https://github.com/nim-lang/Nim/issues/4457#issuecomment-230803230","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/4457","id":230803230,"user":{"login":"Araq","id":287816,"avatar_url":"https://avatars.githubusercontent.com/u/287816?v=3","gravatar_id":"","url":"https://api.github.com/users/Araq","html_url":"https://github.com/Araq","followers_url":"https://api.github.com/users/Araq/followers","following_url":"https://api.github.com/users/Araq/following{/other_user}","gists_url":"https://api.github.com/users/Araq/gists{/gist_id}","starred_url":"https://api.github.com/users/Araq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Araq/subscriptions","organizations_url":"https://api.github.com/users/Araq/orgs","repos_url":"https://api.github.com/users/Araq/repos","events_url":"https://api.github.com/users/Araq/events{/privacy}","received_events_url":"https://api.github.com/users/Araq/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T15:12:36Z","updated_at":"2016-07-06T15:12:36Z","body":"> If one sticks with unix style paths it technically works as windows will accept them, but this is a workaround rather than a proper solution.\r\n\r\nFine solution for me. Except of course we need to fix ospaths so it always can be imported (if os.nim is not used)."}}
{"actor":{"display_login":"Araq"}}