Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated imports over samba shares #1758

Closed
3 tasks done
qgates opened this issue Mar 6, 2020 · 2 comments
Closed
3 tasks done

Outdated imports over samba shares #1758

qgates opened this issue Mar 6, 2020 · 2 comments

Comments

@qgates
Copy link

qgates commented Mar 6, 2020

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform:
  • Vetur version: 0.23.0
  • VS Code version: 1.42.1

Problem

I have a Z: drive mapped to a samba share, and vscode loads the project from Z:\project

Function & data parameter types, return types and access specifiers imported from other modules seem not to update in Vetur when modified (and saved). Reloading vscode causes them to be re-read and fixes the issue. Example:

Module 'test.ts'

export class TestDb {
  public init(type: string) { ... }
}

Module 'xyz.vue'

...
<script lang="ts">
  import Vue from 'vue'
  import { TestDb } from './test'

export default Vue.extend({
  mounted() {
    let x = new TestDb;
    x.init('foo');
  }
});

In module xyz.vue I get a wavy line under x.init() with error Property 'init' is protected and only accessible within class 'TestDb' and its subclasses, because module 'test.ts' had declared method init() as protected when the project was loaded, even though it was then changed to public and saved.

If I restart vscode, everything works correctly because vetur has now re-read test.ts and detected the correct access specifier.

This problem only exists when loading the project from a samba share, and not when the project is loaded from a local drive.

@qgates qgates mentioned this issue Mar 7, 2020
17 tasks
@qgates
Copy link
Author

qgates commented Mar 18, 2020

Any further thoughts on this? At the moment any imports from .ts files don't reflect in .vue files if the .ts file changes. The only workaround seems to be restarting vscode on a regular basis.

@octref
Copy link
Member

octref commented Jun 7, 2020

Duplicate of #1490

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants