GithubHelp home page GithubHelp logo

gaetschwartz / build-runner Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 7.0 257 KB

Home Page: https://marketplace.visualstudio.com/items?itemName=GaetSchwartz.build-runner

License: MIT License

TypeScript 100.00%

build-runner's Introduction

Hi there 👋 my name is Gaëtan Schwartz !

🔭 I’m currently working on ...

📝 My work

🚊 Swift Travel An open-source mobile transport app !

⚙️ All Lint Rules Include all lint rules in your Dart/Flutter project easily !

🔨 Build Runner an extension to run build_runner commands via VSCode!

Freezed an extension for VSCode to generate freezed classes and have Freezed related snippets!

📫 How to reach me

⚡ Fun facts

  • I love coding so much that I oftentimes forget to sleep 😅

Gaëtan's GitHub stats

build-runner's People

Contributors

dependabot[bot] avatar gaetschwartz avatar thize avatar timwhiting avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

build-runner's Issues

Command Build Runner: Build not found

image

Hi,

The error on the screenshot started happening recently. I cannot pinpoint the exact time and place when it started, it could have been latest VSCode update.

I've tried reinstalling the extension and doing flutter clean but to no avail. The build runner command from integrated terminal works fine.

build_runner VS code extension exits with code 66

Hi there,

I am unable to make this extension work on VS code. I'm not sure what I am missing. Yes, I've read through this readme and and I've read build_runner docs.

I am perfectly able to run build_runner in my project via the command line. At the root of the project, I simply write:

flutter pub run build_runner watch -d

And tadah! Everything works fine.

But as I try to do the same with the extension, either by using the shortcut (CMD+B) or by just clicking watch on the bottom bar, I receive this output:

Spawning `flutter pub run build_runner watch --delete-conflicting-outputs` in `[absolute-path-of-my-file-system]/[my-project-folder]`

Command exited with code 66

And that's it! Nothing works from there.
What am I missing?

Failed to remove the watch!

Build runner is running alright. But when I try to "Remove watch" I get the following error dialog in VS Code:
Failed to remove the watch! Try again. If it still doesn't work try closing VSCode and reopening.

Can somebody suggest how to debug this issue?

Thanks.

Import error

Trying on a new computer, js-yaml fails to be found. Is there something special you have to do for extensions to add dependencies?

[2021-10-22 14:12:51.874] [exthost] [error] Activating extension gaetschwartz.build-runner failed due to an error:
[2021-10-22 14:12:51.874] [exthost] [error] Error: Cannot find module 'js-yaml'
Require stack:
- /home/tim/.vscode/extensions/gaetschwartz.build-runner-0.5.1/out/extension.js
- /snap/code/78/usr/share/code/resources/app/out/vs/loader.js
- /snap/code/78/usr/share/code/resources/app/out/bootstrap-amd.js
- /snap/code/78/usr/share/code/resources/app/out/bootstrap-fork.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:934:15)
    at Module._load (internal/modules/cjs/loader.js:779:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Function.i._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:28495)
    at Function.b._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:25083)
    at Function.d._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:60224)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at v (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:4:698)
    at Object.<anonymous> (/home/tim/.vscode/extensions/gaetschwartz.build-runner-0.5.1/out/extension.js:17:14)
    at Module.s._compile (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:4:1315)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
    at Module.load (internal/modules/cjs/loader.js:982:32)
    at Module._load (internal/modules/cjs/loader.js:823:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Function.i._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:28495)
    at Function.b._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:25083)
    at Function.d._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:60224)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Function.r [as __$__nodeRequire] (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:5:101)
    at w._loadCommonJSModule (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:26492)
    at w._doActivateExtension (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:99:12722)
    at w._activateExtension (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:99:11695)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 8)
    at async Promise.all (index 0)[2021-10-22 14:12:51.874] [exthost] [error] Activating extension gaetschwartz.build-runner failed due to an error:
[2021-10-22 14:12:51.874] [exthost] [error] Error: Cannot find module 'js-yaml'
Require stack:
- /home/tim/.vscode/extensions/gaetschwartz.build-runner-0.5.1/out/extension.js
- /snap/code/78/usr/share/code/resources/app/out/vs/loader.js
- /snap/code/78/usr/share/code/resources/app/out/bootstrap-amd.js
- /snap/code/78/usr/share/code/resources/app/out/bootstrap-fork.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:934:15)
    at Module._load (internal/modules/cjs/loader.js:779:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Function.i._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:28495)
    at Function.b._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:25083)
    at Function.d._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:60224)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at v (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:4:698)
    at Object.<anonymous> (/home/tim/.vscode/extensions/gaetschwartz.build-runner-0.5.1/out/extension.js:17:14)
    at Module.s._compile (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:4:1315)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
    at Module.load (internal/modules/cjs/loader.js:982:32)
    at Module._load (internal/modules/cjs/loader.js:823:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Function.i._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:28495)
    at Function.b._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:25083)
    at Function.d._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:60224)
    at Module.require (internal/modules/cjs/loader.js:1006:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Function.r [as __$__nodeRequire] (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:5:101)
    at w._loadCommonJSModule (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:26492)
    at w._doActivateExtension (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:99:12722)
    at w._activateExtension (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:99:11695)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 8)
    at async Promise.all (index 0)

Failed to infer where to run build_runner

First of all thank you for the extension!

image

I get this message every time I open the project and try to start the build_runner, am I missing a configuration somewhere?

CTRL + ALT + B Not Working on Windows

when i type CTRL + ALT + B i'm getting this error

extension version : 0.8.0

Running `flutter.bat pub run build_runner build --build-filter C:/Users/myuser/Documents/mydocs/FLUTTER/myprojectname/lib/app/data/model/request/my_model/my_model_model.freezed.dart --build-filter C:/Users/myuser/Documents/mydocs/FLUTTER/myprojectname/lib/app/data/model/request/my_model/my_model_model.g.dart`
Current working folder: `c:\Users\myuser\Documents\mydocs\FLUTTER\myprojectname`

[INFO] Generating build script...
[INFO] Generating build script completed, took 369ms

Invalid argument (--build-filter): Not a valid build filter, must be either a relative path or `package:` uri.

FormatException: Unsupported scheme c: Instance of '_Uri'

Stuck at initializing

Copy from gaetschwartz/freezed#3

When using watch from status bar it keeps initializing. It never completes while flutter pub run build_runner watch --delete-conflicting-outputs works fine.

Also generating freezed class give error:
Command 'Freezed: Generate a new Freezed class' resulted in an error (Running the contributed command: 'freezed.generate' failed.)

I think problem is with my IDE maybe.

Code - OSS
Version: 1.54.2
Commit: fd6f3bce6709b121a895d042d343d71f317d74e7
Date: 2021-03-12T19:27:39.374Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 5.11.7-arch1-1

Initially filed by @2shrestha22.
@yerzhant and @craigomac also commented.

Add support for flutter version manager

When using flutter version manager (fvm.app) the build_runner extension doesn't work since flutter executable is not in the path and command 'fvm flutter' should be used instead of 'flutter.

Please consider allowing 'fvm flutter' in the list of available commands or allowing to edit the command in settings.json with arbitrary values

Allow executing in subfolder projects

i like to make packages for my data repositories which is in subfolders of my main project
example:

my_project/
my_project/packages/my_auth_repo/
my_project/packages/my_data_repo/

I also need to execute build runner inside of them, however this extension only works in the main project.
ps. dart's official extension recognizes the subproject in which the current open file is located and will execute commands in that subproject, such as pub get.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.