github / github/vscode-github-actions

Linter lints old version when comparing diffs

Aberta
#281 0 comentários 2 reações 0 responsáveis Ver no GitHub
bug
Linguagem predominante
TypeScript
Estrelas
660
Forks
213
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Create & **commit** the following workflow:
```yaml
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build

on:
pull_request:
branches:
- main

permissions:
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-latest
outputs:
build_id: ${{ steps.build.build_id }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
show-progress: false

- name: Build
id: build
shell: bash
run: |
echo "Building"
echo "build_id=12345" >> "$GITHUB_OUTPUT"

```
1. Notice the linting warning on `${{ steps.build.build_id }}`: `Context access might be invalid: build_id`.
1. Delete the following lines, save but do NOT commit:
```yaml
outputs:
build_id: ${{ steps.build.build_id }}
```
1. In the diff window compare the changes
1. (BUG 1) (while diff is open) Notice the LEFT window showing the linting warning, which also shows up under 'PROBLEMS'

![image](https://github.com/github/vscode-github-actions/assets/864376/0999a465-f442-47f3-b4e7-18d45d115e8a)

1. (while diff is open) Double click the warning under problems and notice it opens a locked (denoted the padlock next to the name) version of the previous, unedited version of `build.yaml`.

![image](https://github.com/github/vscode-github-actions/assets/864376/22c71f57-4952-4b89-a2f1-02aa328d24c7)

1. Close the diff & locked old version of `build.yaml`
1. (BUG 2) Notice the linting error is still there under 'PROBLEMS'

![image](https://github.com/github/vscode-github-actions/assets/864376/6e70e611-897e-413a-93f1-a224f2fd8f3e)

1. (BUG 2 related) When double clicking linting warning it opens up the same locked (denoted the padlock next to the name) version of the previous, unedited version of `build.yaml`.
1. (BUG 1) Now when hitting 'CTRL+P' to switch between files there are 2 entries for `build.yaml` which are indistinguishable, yet refer to different versions:

![image](https://github.com/github/vscode-github-actions/assets/864376/387abf74-0a8a-46ab-b8a1-8bac46b6e41b)

**Expected behavior**
Only errors on the new version are reported.

**Screenshots**
See reproduction

**Extension Version**
`v0.26.2`

**Additional context**
Add any other context about the problem here.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Nenhum arquivo-fonte ou teste é especificado. Reproduza o fluxo de trabalho no VS Code com a extensão v0.26.2 e, em seguida, rastreie como os diagnósticos e os documentos abertos são associados enquanto o diff é exibido e depois que ele é fechado. Está concluído somente quando apenas a versão editada relata erros, os avisos não abrem um arquivo antigo bloqueado e o alternador de arquivos não tem entradas duplicadas.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
github-actions, typescript, vscode
Domínio
devtools, tooling
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.