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

incompatible_disallow_filetype: Kill off the "FileType" skylark type and function #5831

Closed
c-parsons opened this issue Aug 8, 2018 · 0 comments
Assignees
Labels
incompatible-change Incompatible/breaking change P1 I'll work on this now. (Assignee required)

Comments

@c-parsons
Copy link
Contributor

This is a tracking issue for offering a migration solution for
--incompatible_disallow_filetype

This flag would disable FileType(), and thus remove the skylark type "FileType".

Guidance on what to use instead is mentioned here: #3738

@c-parsons c-parsons self-assigned this Aug 8, 2018
@laurentlb laurentlb added team-Starlark P1 I'll work on this now. (Assignee required) incompatible-change Incompatible/breaking change and removed category: extensibility > skylark labels Nov 21, 2018
@laurentlb laurentlb changed the title Kill off the "FileType" skylark type and function incompatible_disallow_filetype: Kill off the "FileType" skylark type and function Jan 7, 2019
robfig pushed a commit to robfig/rules_hugo that referenced this issue Apr 24, 2019
It was disabled by default as of Bazel 0.24:
https://blog.bazel.build/2019/03/26/bazel-0.24.html
bazelbuild/bazel#5831

The resulting error message is:

    ERROR: /home/circleci/.cache/bazel/_bazel_circleci/f16e36219ef33c22efc2ad20f3e3775c/external/build_stack_rules_hugo/hugo/internal/hugo_site.bzl:88:27: Traceback (most recent call last):
	File "/home/circleci/.cache/bazel/_bazel_circleci/f16e36219ef33c22efc2ad20f3e3775c/external/build_stack_rules_hugo/hugo/internal/hugo_site.bzl", line 83
		rule(implementation = _hugo_site_impl, ...)})
	File "/home/circleci/.cache/bazel/_bazel_circleci/f16e36219ef33c22efc2ad20f3e3775c/external/build_stack_rules_hugo/hugo/internal/hugo_site.bzl", line 87, in rule
		attr.label(allow_files = FileType([".toml",..."]), <2 more arguments>)
	File "/home/circleci/.cache/bazel/_bazel_circleci/f16e36219ef33c22efc2ad20f3e3775c/external/build_stack_rules_hugo/hugo/internal/hugo_site.bzl", line 88, in attr.label
		FileType([".toml", ".yaml", ".json"])
    FileType function is not available. You may use a list of strings instead. You can temporarily reenable the function by passing the flag --incompatible_disallow_filetype=false

For this filtering to a set of extensions, a simple string list will do.
bazel-io pushed a commit that referenced this issue Jun 13, 2019
#5831

RELNOTES: None.
PiperOrigin-RevId: 253027470
irengrig pushed a commit to irengrig/bazel that referenced this issue Jun 18, 2019
bazelbuild#5831

RELNOTES: None.
PiperOrigin-RevId: 253027470
siberex pushed a commit to siberex/bazel that referenced this issue Jul 4, 2019
bazelbuild#5831

RELNOTES: None.
PiperOrigin-RevId: 253027470
irengrig pushed a commit to irengrig/bazel that referenced this issue Jul 15, 2019
bazelbuild#5831

RELNOTES: None.
PiperOrigin-RevId: 253027470
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incompatible-change Incompatible/breaking change P1 I'll work on this now. (Assignee required)
Projects
None yet
Development

No branches or pull requests

3 participants