Ideas for a nicer way to support different os's/implementation in types #157
Labels
No labels
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ungleich-public/cdist#157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: asteven
Just thinking out loud.
Instead of the endless case esac if os then else what if a type would have a internal API?
Maybe in form of shell functions?
Then there could be a default implementation, e.g. in __some_type/lib/default
And if some $os doesn't like that it can create it's own implementation in _some_type/lib/$os
The gencode-* would then just call shell functions which write to stdout.
e.g.
_some_type/lib/default:
_some_type/lib/netbsd:
_some_type/gencode-remote:
One could even implement kind of 'call super' using an aproach like this.
No more stinking spagetti code.
Comments?
mentioned in issue #782
closed
Created by: telmich
Great idea! But I suggest using $__type/files/lib instead