carvel-dev / carvel-dev/ytt

Reconcile type name of library instances with other custom types in the ytt standard lib

Open
#579 0 comments 0 reactions 0 assignees View on GitHub
enhancement priority/unprioritized-backlog
Dominant language
Go
Stars
1.9k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem/challenge you have**
Rename type(library.get()) from "module" to "@ytt:library.instance".

For example, with:
```
_ytt_lib/lib/template.yml
config.yml
```

```yaml
#! _ytt_lib/lib/template.yml
---
```

```yaml
#! ./config.lib
#@ load("@ytt:library", "library")

type: #@ type(library.get("lib"))
```

this happens:

```bash
ytt -f .
type: module
```

**Describe the solution you'd like**

Would rather this output:

```bash
ytt -f .
type: @ytt:library.instance
```

To reconcile the emerging convention of type names in the `ytt` standard library.

**Anything else you would like to add:**
[Documentation](https://carvel.dev/ytt/docs/latest/lang-ref-ytt-library/) refers to this string already. ;)

---
Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Contributor guide

Open the contributing guide

Research direction

Reproduce the example using _ytt_lib/lib/template.yml, config.yml, and `ytt -f .`; start by tracing the `library.get()` type-name handling. Done means the example reports `@ytt:library.instance` instead of `module`, consistently with the linked ytt standard-library documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.