[AT-65] Added warning when no files found in fileset#1007
Merged
JakeDawkins merged 5 commits intomasterfrom Feb 15, 2019
Merged
[AT-65] Added warning when no files found in fileset#1007JakeDawkins merged 5 commits intomasterfrom
JakeDawkins merged 5 commits intomasterfrom
Conversation
trevor-scheer
approved these changes
Feb 11, 2019
Contributor
trevor-scheer
left a comment
There was a problem hiding this comment.
This is a nice win for usability, and straightforward. Nice work!
I'll leave it up to you, but it would be awesome to have a few tests for FileSet, specifically around includes/excludes behavior.
5795adb to
9feb85c
Compare
trevor-scheer
approved these changes
Feb 13, 2019
Co-Authored-By: JakeDawkins <dawkinsjh@gmail.com>
Co-Authored-By: JakeDawkins <dawkinsjh@gmail.com>
This was referenced Feb 25, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1002
Fixes #702
Fixes #883
File count warnings
Whenever the VS Code extension opens a file, it tries to find a projectForFile. If the includes or excludes field in the Apollo Config file is misconfigured, it may never actually find the project for a given file.
The way the status bar/stats reporting command is setup, if you click the icon to report stats while having one of those files open, it will not find the associated project and warn that the project may be misconfigured. Which is okay, but I think we can do better.
On project creation, this PR checks the FileSet to see how many files are included. If there are 0 files in the FileSet (excluding
.envand configs), we issue a warning but not an error. that's because there's no way to know that there are supposed to be files there. Maybe the user is bootstrapping a new project and there just aren't any files yet.Includes/Excludes fixes
Because of how we were using glob/minimatch on the includes/excludes, there were some issues:
./src/__tests__) would not work withFileSet.includesFile. To fix,includesFilenow uses the results ofallFiles([apollo-graphql] vscode gql tag functionality broken when relative globs used in includes config #1002)excludeswasn't properly being filtered out inFileSet.allFiles, and wouldn't allow proper filtering if the glob was relative (the same issue that originally was inincludesFileTODO:
*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.