Skip to content

feat: release 2.1.0-rc.1#11

Merged
NullSablex merged 3 commits intomasterfrom
2.1.0-rc.1
Mar 8, 2026
Merged

feat: release 2.1.0-rc.1#11
NullSablex merged 3 commits intomasterfrom
2.1.0-rc.1

Conversation

@NullSablex
Copy link
Copy Markdown
Owner

Adicionado

  • CodeLens com contagem de referências — mostra "X referências" acima de cada função
  • Detecção de macros públicas — CodeLens detecta funções via macro (PREFIX::Nome()), equivalentes a forward + public
  • Detecção de símbolos não utilizados — alerta para variáveis e funções stock não utilizadas
  • Sintaxe para pontuação — destaque para (), [] e {}
  • Validação de declarações — verifica estrutura de native/forward/public/stock
  • Signature Help — exibe assinatura e parâmetro ativo ao digitar ( e ,
  • Auto-complete — sugestões de funções e macros de includes e API
  • Internacionalização (NLS) — suporte a PT-BR/EN via vscode-nls
  • Comando de debug de cache — PawnPro: Cache Statistics (Debug)
  • Painel "O que há de novo" — exibe CHANGELOG.md dinamicamente a cada atualização
  • Template de script — PawnPro: Novo Script (Gamemode/Filterscript)

Alterado

  • Hover busca apenas em arquivos efetivamente incluídos
  • Natives reconhecem tags de retorno (native bool:funcName(...))
  • Terminal do servidor reutiliza terminal existente
  • Diagnósticos ignoram #include em comentários

Melhorado

  • Cache centralizado (fileCache.ts) compartilhado por todos os componentes
  • Invalidação automática por FileWatcher em .pwn/.inc
  • Pre-warming do cache na ativação
  • Suporte a documentos não salvos via document.version
  • Performance de hover, apiIndex e diagnósticos

Segurança

  • CWE-400 (ReDoS): escapeRe() em todas as interpolações de new RegExp(name)
  • CVEs corrigidos via overrides (minimatch, qs, ajv, markdown-it, underscore)
  • SECURITY.md adicionado com relatório completo de auditoria

### Adicionado
- CodeLens com contagem de referências — mostra "X referências" acima de cada função
- Detecção de macros públicas — CodeLens detecta funções via macro (PREFIX::Nome()), equivalentes a forward + public
- Detecção de símbolos não utilizados — alerta para variáveis e funções stock não utilizadas
- Sintaxe para pontuação — destaque para (), [] e {}
- Validação de declarações — verifica estrutura de native/forward/public/stock
- Signature Help — exibe assinatura e parâmetro ativo ao digitar ( e ,
- Auto-complete — sugestões de funções e macros de includes e API
- Internacionalização (NLS) — suporte a PT-BR/EN via vscode-nls
- Comando de debug de cache — PawnPro: Cache Statistics (Debug)
- Painel "O que há de novo" — exibe CHANGELOG.md dinamicamente a cada atualização
- Template de script — PawnPro: Novo Script (Gamemode/Filterscript)

### Alterado
- Hover busca apenas em arquivos efetivamente incluídos
- Natives reconhecem tags de retorno (native bool:funcName(...))
- Terminal do servidor reutiliza terminal existente
- Diagnósticos ignoram #include em comentários

### Melhorado
- Cache centralizado (fileCache.ts) compartilhado por todos os componentes
- Invalidação automática por FileWatcher em .pwn/.inc
- Pre-warming do cache na ativação
- Suporte a documentos não salvos via document.version
- Performance de hover, apiIndex e diagnósticos

### Segurança
- CWE-400 (ReDoS): escapeRe() em todas as interpolações de new RegExp(name)
- CVEs corrigidos via overrides (minimatch, qs, ajv, markdown-it, underscore)
- SECURITY.md adicionado com relatório completo de auditoria
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 00f265a51d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/core/fileCache.ts
Comment thread src/core/fileCache.ts Outdated
Comment thread src/core/fileCache.ts Outdated
- Unsaved document: getFileText verifica pseudo-mtime negativo antes
  do stat, garantindo que edições não salvas sejam sempre retornadas
- Commented includes: collectIncludeTokens strip comentários antes de
  aplicar o regex, evitando dependências falsas no grafo de includes
- Cache key de includes agora incorpora includePaths, evitando reuso
  stale quando a configuração de paths muda
- Normalização de path (path.normalize) aplicada consistentemente em
  todos os lookups de cache: getFileIdents, getFileSymbols,
  getFileFunctions, getApiFileFunctions
Copy link
Copy Markdown
Owner Author

@NullSablex NullSablex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Foi corrigido os pontos citados e mais alguns outros que se passou despercebido.

Copy link
Copy Markdown
Owner Author

@NullSablex NullSablex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex review

@NullSablex NullSablex merged commit b2b1318 into master Mar 8, 2026
4 checks passed
@NullSablex NullSablex deleted the 2.1.0-rc.1 branch March 8, 2026 18:50
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 930814e969

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +165 to +168
vscode.workspace.onDidChangeTextDocument((e) => {
const doc = e.document;
if (doc.languageId === 'pawn' && doc.isDirty) {
setDocumentText(doc.fileName, doc.getText(), doc.version);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Clear unsaved text cache when a document is discarded

This change writes dirty editor snapshots into the file cache, but it never clears those snapshots when a document is closed/reverted without saving. Since getFileText prefers pseudo-mtime entries, a discarded edit can continue to override on-disk content for the same path, causing persistent phantom diagnostics/hover/completion data until a filesystem change or extension reload happens.

Useful? React with 👍 / 👎.

Comment thread src/core/fileCache.ts
Comment on lines +625 to +629
// Invalidate derived caches so they rebuild with new text
identsCache.delete(norm);
symbolsCache.delete(norm);
funcsCache.delete(norm);
apiCache.delete(norm);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Invalidate include graph cache on unsaved text updates

When unsaved text is injected, this function invalidates symbol/function caches but leaves includesCache intact, while getIncludedFiles reuses include results by disk mtime. If a user edits #include directives without saving, cross-file features continue using the old include graph and can miss or invent references until the file is saved.

Useful? React with 👍 / 👎.

Comment on lines +218 to +219
const open = before.lastIndexOf('(');
if (open < 0) return undefined;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve call context using unmatched opening parenthesis

Using lastIndexOf('(') selects the most recent parenthesis, not the nearest unmatched one, so nested calls are resolved incorrectly. For example, at foo(bar(1,2), |) this returns bar instead of foo, which yields incorrect signature and active-parameter hints in common nested-call editing scenarios.

Useful? React with 👍 / 👎.

@NullSablex NullSablex restored the 2.1.0-rc.1 branch March 8, 2026 18:53
NullSablex added a commit that referenced this pull request Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant