CircleCI-Public / circleci-yaml-language-server

The official language server for CircleCI YAML configuration files
Apache License 2.0
20 stars 18 forks source link

Orb is stated to be unused #265

Open BrentWilkins opened 9 months ago

BrentWilkins commented 9 months ago

I roughly copy-pasted the following code from this example.

version: 2.1
orbs:
  aws-cli: circleci/aws-cli@4.1
  aws-ecr: circleci/aws-ecr@9.0
jobs:
  build-test-then-push-with-buildx:
    machine:
      image: ubuntu-2204:2023.07.2
    steps:
      - aws-ecr/build_and_push_image:
          attach_workspace: true
          auth:
            - aws-cli/setup:
                role_arn: arn:aws:iam::123456789012
          create_repo: true
          dockerfile: Dockerfile
          path: workspace
          platform: linux/amd64
          push_image: false
          region: us-west-2
          repo: my-sample-repo
          tag: sampleTag
          workspace_root: .

workflows:
  build-and-test:
    jobs:
      - build-test-then-push-with-buildx

aws-cli: circleci/aws-cli@4.1 has the yellow squiggly underline. It expands to this:

Orb is unused cci-language-server https://circleci.com/docs/creating-orbs#semantic-versioning-in-orbs

An orb to depend on and its semver range, or volatile for the most recent release.

CircleCI config.yml https://circleci.com/docs/creating-orbs#semantic-versioning-in-orbs

An orb to depend on and its semver range, or volatile for the most recent release.

Source: circleciconfig.json

What is it called when we use it in the auth section below that? In my actual project I don't get the unused error, but I get an undefined error where I use it.

loderunner commented 9 months ago

Thanks for bringing this issue to our attention! It seems we do not consider an orb as used when its steps are used as a parameter to another step. Looking into this.

In my actual project I don't get the unused error, but I get an undefined error where I use it.

I'm not sure I actually understand. Could you explain what you mean by "an undefined error where I use it"? Feel free to share screenshots or code snippets.