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

wip: Initial include support #3531

Closed
wants to merge 1 commit into from

Conversation

lu-zero
Copy link

@lu-zero lu-zero commented Dec 18, 2024

Here what I'd propose for adding the ability to reuse some hurl file fragment over others

  • Have a Directive that can be intermixed with Entry syntax element
    • Have an [Include] directive with a path that must be another hurl file
  • Add a fn resolve(context: Context) that produces a new HurlFile with all the directives resolved

Usage wise resolve() needs to know what is its root base and pass it down so every hurl files that gets included.
It will need some mechanism to detect inclusion cycles so the Context will have to keep track on where it is.

Fixes #2110 and #317

@jcamiel
Copy link
Collaborator

jcamiel commented Dec 18, 2024

Ho @lu-zero

Thanks for your PR but unfortunately, we have decided to postpone working on include: we think implementation is probably hard, syntax has to be decide, and some things needs to be discuss (cycle, error displays etc.) if yet we choose to add it.

@lu-zero
Copy link
Author

lu-zero commented Dec 18, 2024

Oh well, I guess you can use this as discussion/starting point.

Implementation wise, even if I had to get accustomed to your codebase, didn't feel too hard.

@jcamiel jcamiel closed this Dec 18, 2024
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

Successfully merging this pull request may close these issues.

How to reuse the login logic
2 participants