-
Notifications
You must be signed in to change notification settings - Fork 45
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
Extend Partial Resolution #76
Comments
Sorry I did not immediately respond! Github emails sometimes seem to get lost for me. This isn't something that's currently supported, but I do like the idea. Let me have a think about it. I have a feeling it's actually going to be easy... The problem with a lot of these requests people have is that they require context that the resolver doesn't currently have. I think though in this case everything is there to make it work. |
I took a look at #77 first, because it seemed easier, and I have an approach to adding that functionality. It's eerily similar, but not the same. The solution I proposed there would require you not to set the |
Apologies, I've been away from my work computer for the last week and didn't see this. I think it would be fine for internal references within a parent to remain untouched, yes |
Ok, thank you - no need to apologize, I also have a ton of other things on my mind. The break was good :) I'll get back to this as soon as I can. |
This will take me a while longer, mostly due to time constraints. The issue is the recursive nature of your references here. As it currently stands, the resolver for the parent file will start a resolver for the child file, which will look up in the parent file how to resolve a reference. The key point here is the parent file - not the current parent resolver. It would need some kind of back channel to the parent resolver to achieve this kind of thing. Which, to be fair, would be a powerful feature, but it's not really something I'll have much time for in the near future. |
This too, just as #77 will be resolved by the new Translating Parser. It does not support all the configuration options of the ResolvingParser, but the a viable prototype lives now in Glutexo/prance-translating-parser and I’ll create pull request to add it to the upstream. |
This test should cover this issue. Please challenge if you feel there is a need for more tests. |
I may have be missing something which is already possible, so apologies if this is case.
I'd like to be able to have a reference to a specific part of the 'parent' file become an internal reference when the 'child' file is resolved.
Minimal Example Spec
root/parent.yaml
root/subfolder/child.yaml
Would resolve to:
compiled.yaml
Actual Behaviour
I've tried to produce this effect with the partial resolution option, but have not been able to get it to work. Applying only RESOLVE_FILES will result in a crash, as the references isn't actually an internal reference. Running without RESOLVE_FILES will fully resolve the reference.
@jfinkhaeuser
The text was updated successfully, but these errors were encountered: