{"action":"created","issue":{"url":"https://api.github.com/repos/wacossusca34/glava/issues/74","repository_url":"https://api.github.com/repos/wacossusca34/glava","labels_url":"https://api.github.com/repos/wacossusca34/glava/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/wacossusca34/glava/issues/74/comments","events_url":"https://api.github.com/repos/wacossusca34/glava/issues/74/events","html_url":"https://github.com/wacossusca34/glava/issues/74","id":374193477,"node_id":"MDU6SXNzdWUzNzQxOTM0Nzc=","number":74,"title":"Parse and include system defaults for module configs","user":{"login":"wacossusca34","id":1881867,"node_id":"MDQ6VXNlcjE4ODE4Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1881867?v=4","gravatar_id":"","url":"https://api.github.com/users/wacossusca34","html_url":"https://github.com/wacossusca34","followers_url":"https://api.github.com/users/wacossusca34/followers","following_url":"https://api.github.com/users/wacossusca34/following{/other_user}","gists_url":"https://api.github.com/users/wacossusca34/gists{/gist_id}","starred_url":"https://api.github.com/users/wacossusca34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wacossusca34/subscriptions","organizations_url":"https://api.github.com/users/wacossusca34/orgs","repos_url":"https://api.github.com/users/wacossusca34/repos","events_url":"https://api.github.com/users/wacossusca34/events{/privacy}","received_events_url":"https://api.github.com/users/wacossusca34/received_events","type":"User","site_admin":false},"labels":[{"id":761099970,"node_id":"MDU6TGFiZWw3NjEwOTk5NzA=","url":"https://api.github.com/repos/wacossusca34/glava/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"wacossusca34","id":1881867,"node_id":"MDQ6VXNlcjE4ODE4Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1881867?v=4","gravatar_id":"","url":"https://api.github.com/users/wacossusca34","html_url":"https://github.com/wacossusca34","followers_url":"https://api.github.com/users/wacossusca34/followers","following_url":"https://api.github.com/users/wacossusca34/following{/other_user}","gists_url":"https://api.github.com/users/wacossusca34/gists{/gist_id}","starred_url":"https://api.github.com/users/wacossusca34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wacossusca34/subscriptions","organizations_url":"https://api.github.com/users/wacossusca34/orgs","repos_url":"https://api.github.com/users/wacossusca34/repos","events_url":"https://api.github.com/users/wacossusca34/events{/privacy}","received_events_url":"https://api.github.com/users/wacossusca34/received_events","type":"User","site_admin":false},"assignees":[{"login":"wacossusca34","id":1881867,"node_id":"MDQ6VXNlcjE4ODE4Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1881867?v=4","gravatar_id":"","url":"https://api.github.com/users/wacossusca34","html_url":"https://github.com/wacossusca34","followers_url":"https://api.github.com/users/wacossusca34/followers","following_url":"https://api.github.com/users/wacossusca34/following{/other_user}","gists_url":"https://api.github.com/users/wacossusca34/gists{/gist_id}","starred_url":"https://api.github.com/users/wacossusca34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wacossusca34/subscriptions","organizations_url":"https://api.github.com/users/wacossusca34/orgs","repos_url":"https://api.github.com/users/wacossusca34/repos","events_url":"https://api.github.com/users/wacossusca34/events{/privacy}","received_events_url":"https://api.github.com/users/wacossusca34/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-10-26T01:34:12Z","updated_at":"2018-10-27T04:53:10Z","closed_at":"2018-10-27T04:40:43Z","author_association":"OWNER","body":"See [this comment I made earlier](https://github.com/wacossusca34/glava/pull/73#issuecomment-433256283) for some context. Adding new options to existing modules unfortunately breaks local configurations upon `make install` (or package updates), due to how modules are symlinked in.\r\n\r\nThis feature would add a `#config` directive to replace `#include \":config_path\"` in module sources that intelligently handles defines."},"comment":{"url":"https://api.github.com/repos/wacossusca34/glava/issues/comments/433590915","html_url":"https://github.com/wacossusca34/glava/issues/74#issuecomment-433590915","issue_url":"https://api.github.com/repos/wacossusca34/glava/issues/74","id":433590915,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzU5MDkxNQ==","user":{"login":"wacossusca34","id":1881867,"node_id":"MDQ6VXNlcjE4ODE4Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1881867?v=4","gravatar_id":"","url":"https://api.github.com/users/wacossusca34","html_url":"https://github.com/wacossusca34","followers_url":"https://api.github.com/users/wacossusca34/followers","following_url":"https://api.github.com/users/wacossusca34/following{/other_user}","gists_url":"https://api.github.com/users/wacossusca34/gists{/gist_id}","starred_url":"https://api.github.com/users/wacossusca34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wacossusca34/subscriptions","organizations_url":"https://api.github.com/users/wacossusca34/orgs","repos_url":"https://api.github.com/users/wacossusca34/repos","events_url":"https://api.github.com/users/wacossusca34/events{/privacy}","received_events_url":"https://api.github.com/users/wacossusca34/received_events","type":"User","site_admin":false},"created_at":"2018-10-27T04:53:10Z","updated_at":"2018-10-27T04:53:10Z","author_association":"OWNER","body":"I implemented this in a different way:\r\n\r\n* First, I wrote a workaround in GLava's GLSL preprocessor to allow `#define` to work with existing macros. It works by emitting the same boilerplate that #75 would have manually added. **Note that this behavior does not exist for function-like macros (`#define foo() ...`), and thus should be avoided in module configurations.**\r\n\r\n* I then wrote a new piece of syntax for `#include` in macros: `@`. It works just like the `:` path specifier, but instead of resolving to the current configuration directory (usually `~/.config/glava`), it resolves to the _top level_ directory, which in regular builds is the system directory.\r\n\r\nWith these two new changes, you can now do:\r\n\r\n```GLSL\r\n/* system (default) values */\r\n#include \"@module.glsl\"\r\n/* user values */\r\n#include \":module.glsl\"\r\n```\r\n\r\nNote that in standalone builds, or GLava instances without a `.config` entry, these two paths will be the same.\r\n\r\nSince this commit only makes changes to module sources, it should be backwards compatible."}}
{"actor":{"display_login":"wacossusca34"}}