Skip to content

Remove file-level attributes #733

@bernardnormier

Description

@bernardnormier

Slice currently provides both file level attributes (with the [[...]]) syntax, and attributes for module openings, with the standard [...] syntax.

This is redundant and possibly misleading.

Each Slice file must have exactly one module opening (before any other definition), and two "identical" module openings in separate files can have different attributes. The attributes only apply to this particular module opening ... or file, since we have exactly one module opening per file.

See https://docs.icerpc.dev/slice2/language-guide/attributes.

Proposal

Simplify attributes by replacing file level attributes by module opening attributes.

For example:

[[allow(Deprecated)]]

module SampleModule

becomes

[allow(Deprecated)]

module SampleModule

with the same semantics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions