Skip to content

[BUG] VSCE "Compile File" button incorrectly displays "Stale File" #575

@dataders

Description

@dataders

The VSCE can successfully compile a project without errors.

However, after compiling, I expected that I could click "Compile File" for a package model, but couldn't even though I could navigate to the compiled file in the target/compiled directory.

I suspect there's some funny business with the package model resource path

model path relative to dbt project
dbt_packages/hubspot/models/staging/tmp/stg_hubspot__contact_tmp.sql

compiled model path
target/compiled/models/staging/tmp/stg_hubspot__contact_tmp.sql

perhaps VSCE is looking for a non-existent path that includes dbt_packages/hubspot/, but that path doesn't exist because all compiled package models are thrown into the same models/ directory?

/*
 * ⚠️ Stale file
 * Compilation completed, but this file was not updated.
 * Try checking the Problems tab or running `dbt compile` in the terminal.
*/
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvscePertains to the VS Code Extension / Language Server

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions