Skip to content
This repository was archived by the owner on Jan 12, 2022. It is now read-only.
This repository was archived by the owner on Jan 12, 2022. It is now read-only.

dev_appserver.py doesn't ignore directories indicated in --watcher_ignore_re and skip_files #122

@ar-qun

Description

@ar-qun

There are reports that --watcher_ignore_re and skip_files do not have any effect.

The case:

def ignore_dir(dirpath, dirname, skip_files_re):
"""Report whether a directory should not be watched."""
return (dirname.startswith(_IGNORED_PREFIX) or
skip_files_re and skip_files_re.match(os.path.join(dirpath, dirname)))

  1. os.path.join(dirpath, dirname) returns an absolute path.
  2. skip_files_re.match compares from the begging
  3. match seem always return False

I observed that function

def skip_ignored_dirs(dirpath, dirnames, skip_files_re=None):
"""Skip directories that should not be watched.
Args:
dirpath: the prefix of absolute paths to dirnames.
dirnames: a list of directories. e.g: we have two directories:
'/tmp/foo/a.txt', '/tmp/foo/b.txt', then:
dirpath = '/tmp/foo', dirnames = ['a.txt', 'b.txt']
skip_files_re: a regular_expression, absolute paths matching it are
skippable.
"""
_remove_pred(dirnames, lambda d: ignore_dir(dirpath, d, skip_files_re))

doesn't produce any changes on the list of directories dirnames.

gcloud is of version 183 and python extension was updated on 19th of December(will edit in the version tomorrow).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions