{"action":"created","issue":{"url":"https://api.github.com/repos/fastbuild/fastbuild/issues/82","labels_url":"https://api.github.com/repos/fastbuild/fastbuild/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/fastbuild/fastbuild/issues/82/comments","events_url":"https://api.github.com/repos/fastbuild/fastbuild/issues/82/events","html_url":"https://github.com/fastbuild/fastbuild/issues/82","id":124670373,"number":82,"title":"default value for #import in case the envar doesn't exist","user":{"login":"shooshx","id":1285088,"avatar_url":"https://avatars.githubusercontent.com/u/1285088?v=3","gravatar_id":"","url":"https://api.github.com/users/shooshx","html_url":"https://github.com/shooshx","followers_url":"https://api.github.com/users/shooshx/followers","following_url":"https://api.github.com/users/shooshx/following{/other_user}","gists_url":"https://api.github.com/users/shooshx/gists{/gist_id}","starred_url":"https://api.github.com/users/shooshx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shooshx/subscriptions","organizations_url":"https://api.github.com/users/shooshx/orgs","repos_url":"https://api.github.com/users/shooshx/repos","events_url":"https://api.github.com/users/shooshx/events{/privacy}","received_events_url":"https://api.github.com/users/shooshx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fastbuild/fastbuild/labels/Enhancement","name":"Enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-03T20:46:13Z","updated_at":"2016-01-16T07:04:56Z","closed_at":null,"body":"Using #import, if the given environment variable doesn't exist, the parsing of the .bff fails. this makes #import less useful than it could have been since if I use it anywhere, I now have to make sure this variable is always defined and I can't even do a simple ./FBuild in the .bff folder. \r\nA reasonable solution is to add a second space delimited, optional argument to #import that would be the default value, in case the given name doesn't exist. this is similar to python's dict.get()\r\n**pro**: gives maximum flexibility\r\n**con**: some might find it a weird syntax \r\nAnother alternative is that #import just sets the variable to an empty string, \r\n**pro**: no syntax change, simpler concept\r\n**con**: less powerful \r\n**con**: break backward compatibility as far as error handling is concerned.\r\nlet me know what you prefer and I'll code it."},"comment":{"url":"https://api.github.com/repos/fastbuild/fastbuild/issues/comments/172167521","html_url":"https://github.com/fastbuild/fastbuild/issues/82#issuecomment-172167521","issue_url":"https://api.github.com/repos/fastbuild/fastbuild/issues/82","id":172167521,"user":{"login":"Manuzor","id":5539930,"avatar_url":"https://avatars.githubusercontent.com/u/5539930?v=3","gravatar_id":"","url":"https://api.github.com/users/Manuzor","html_url":"https://github.com/Manuzor","followers_url":"https://api.github.com/users/Manuzor/followers","following_url":"https://api.github.com/users/Manuzor/following{/other_user}","gists_url":"https://api.github.com/users/Manuzor/gists{/gist_id}","starred_url":"https://api.github.com/users/Manuzor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manuzor/subscriptions","organizations_url":"https://api.github.com/users/Manuzor/orgs","repos_url":"https://api.github.com/users/Manuzor/repos","events_url":"https://api.github.com/users/Manuzor/events{/privacy}","received_events_url":"https://api.github.com/users/Manuzor/received_events","type":"User","site_admin":false},"created_at":"2016-01-16T07:04:56Z","updated_at":"2016-01-16T07:04:56Z","body":":+1:\r\nI'm looking for the same thing as @kovarex. It would be very useful to make some environment variables optional, possibly even having the ability to react on whether they exist or not.\r\n\r\nI'm thinking\r\n```\r\n#if !VS140COMNTOOLS\r\n#if !VS120COMNTOOLS\r\n\"Unable to find VS2015 or VS2013\"\r\n#endif\r\n#endif\r\n```"}}