-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(maint) - add adr for aggregating of file type
- Loading branch information
1 parent
807255a
commit 5e0053c
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
docs/architecture/decisions/0001-aggregate-file-definitions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 1. Aggregation of file resource type definitions | ||
|
||
Date: 2023-11-27 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
During [this issue](https://github.com/puppetlabs/puppet-editor-services/issues/349), it was noted that the file resource type had multiple missing parameters in the dropdown autocompletion list. After some investigation, it was discovered that this way due to the way the file resource type is defined in the puppet source code, with having multiple definitions in different files. puppet-editor-services was only designed to collect the parameters in the file `lib/puppet/type/file.rb`, and collected all parameters from this file as you would expect, however it would ignore all other parameters which were defined in the files `lib/puppet/type/file/*.rb`. (see [here](https://github.com/puppetlabs/puppet/tree/main/lib/puppet/type/file)). | ||
|
||
## Decision | ||
|
||
A decision was taken in [this pr](https://github.com/puppetlabs/puppet-editor-services/pull/353) (later updated to write to a tempfile [here](https://github.com/puppetlabs/puppet-editor-services/pull/359)) to aggregate all seperate file type defintions and write these to a single file, this could then be used as a single point of reference for the language server. This allowed puppet-editor-services to collect all parameters of the file type as expected. | ||
|
||
## Consequences | ||
|
||
* `Go To Definition` will direct the user to the initial file type declaration at `/lib/puppet/type/file.rb`, not to the other type definitions. |