Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registration mechanism instead of symlink based for custom loaders, parsers etc. #29

Open
zgornel opened this issue Mar 5, 2020 · 0 comments

Comments

@zgornel
Copy link
Owner

zgornel commented Mar 5, 2020

A new mechanism based on explicit registering of loaders, parsers etc. should exist. This allows for

  • removal of the custom folders + symlinks directly specifying a custom hook file that includes all custom code (loaders, etc.);The path to the custom hook file should be a gars option.
  • This gives the ability for parsers calling to call other parsers, and so on. (i.e. an auto or pre-parser Implicit parser specification #28 )

Mockup

  • gars starts with gars -d config.jl --hook ./custom_hooks.jl -p 9000 --log-level debug
  • hook file, custom_hooks.jl contains a loader and a parser
@register_loader fload "A nice loader name"
function fload(path) 
    #...
end

@register_parser fparse "An even nicer parser name"
fparse(path)
    # ...
end

Now, a preparser would parse a raw query, extract the parser from a "parser>query" pattern
and execute it (this option could be a default for missing input_parser in requests, with a fallback to noop if no parser can be selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant