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

pragmas: type pragmas must follow generic params #400

Conversation

saem
Copy link
Collaborator

@saem saem commented Aug 6, 2022

Summary

removed the previous deprecation where pragmas could preceed the generic
parameter list in a type definition, eg:

type Foo{.somePragma}[T] = ... # now an error
type Foo[T] {.somePragma.} = ... # acceptable

Details

Due to lots of issues, mostly stylistic, I've pragmas on the RHS of a
type definition as legal. Largely because after changing it I realized a
more significant rethink of type declaration syntax should cover this in
the future.

Fixed a number of test failures along the way due to this change.

@saem saem force-pushed the saem-qw-06-pragmas-type-pragmas-must-follow-generic-params branch from fc033cc to cc88755 Compare August 6, 2022 03:37
removed the previous deprecation where pragmas could preceed the generic
parameter list in a type definition, eg:

```
type Foo{.somePragma}[T] = ... # now an error
type Foo[T] {.somePragma.} = ... # acceptable
```

Due to lots of issues, mostly stylistic, I've pragmas on the RHS of a
type definition as legal. Largely because after changing it I realized a
more significant rethink of type declaration syntax should cover this in
the future.

Fixed a number of test failures along the way due to this change.
@saem saem force-pushed the saem-qw-06-pragmas-type-pragmas-must-follow-generic-params branch from cc88755 to edc3656 Compare August 6, 2022 19:16
@saem
Copy link
Collaborator Author

saem commented Aug 6, 2022

bors r+

bors bot added a commit that referenced this pull request Aug 6, 2022
400: pragmas: type pragmas must follow generic params r=saem a=saem

## Summary

removed the previous deprecation where pragmas could preceed the generic
parameter list in a type definition, eg:

```
type Foo{.somePragma}[T] = ... # now an error
type Foo[T] {.somePragma.} = ... # acceptable
```

## Details

Due to lots of issues, mostly stylistic, I've pragmas on the RHS of a
type definition as legal. Largely because after changing it I realized a
more significant rethink of type declaration syntax should cover this in
the future.

Fixed a number of test failures along the way due to this change.

Co-authored-by: Saem Ghani <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 6, 2022

Build failed:

@saem
Copy link
Collaborator Author

saem commented Aug 7, 2022

bors r+

bors bot added a commit that referenced this pull request Aug 7, 2022
400: pragmas: type pragmas must follow generic params r=saem a=saem

## Summary

removed the previous deprecation where pragmas could preceed the generic
parameter list in a type definition, eg:

```
type Foo{.somePragma}[T] = ... # now an error
type Foo[T] {.somePragma.} = ... # acceptable
```

## Details

Due to lots of issues, mostly stylistic, I've pragmas on the RHS of a
type definition as legal. Largely because after changing it I realized a
more significant rethink of type declaration syntax should cover this in
the future.

Fixed a number of test failures along the way due to this change.

Co-authored-by: Saem Ghani <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 7, 2022

Timed out.

@saem
Copy link
Collaborator Author

saem commented Aug 7, 2022

bors r+

bors bot added a commit that referenced this pull request Aug 7, 2022
400: pragmas: type pragmas must follow generic params r=saem a=saem

## Summary

removed the previous deprecation where pragmas could preceed the generic
parameter list in a type definition, eg:

```
type Foo{.somePragma}[T] = ... # now an error
type Foo[T] {.somePragma.} = ... # acceptable
```

## Details

Due to lots of issues, mostly stylistic, I've pragmas on the RHS of a
type definition as legal. Largely because after changing it I realized a
more significant rethink of type declaration syntax should cover this in
the future.

Fixed a number of test failures along the way due to this change.

Co-authored-by: Saem Ghani <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 7, 2022

Build failed:

@saem saem closed this Aug 7, 2022
@saem saem reopened this Aug 7, 2022
@saem
Copy link
Collaborator Author

saem commented Aug 7, 2022

bors r+

@saem
Copy link
Collaborator Author

saem commented Aug 7, 2022

@alaviss do you know what's up with this, all tests/checks seem good and bors continually is gets stuck. Reopening the PR, syncing, etc, aren't helping. :(

@bors
Copy link
Contributor

bors bot commented Aug 7, 2022

Build succeeded:

@bors bors bot merged commit 05dfeb9 into nim-works:devel Aug 7, 2022
@saem
Copy link
Collaborator Author

saem commented Aug 7, 2022

Sure, now it works.

@alaviss
Copy link
Contributor

alaviss commented Aug 7, 2022

@alaviss do you know what's up with this, all tests/checks seem good and bors continually is gets stuck. Reopening the PR, syncing, etc, aren't helping. :(

It could be that the bors server is overloaded. That does happen from time to time.

Once Github Merge Queue become available I will look into it as a bors substitute.

@haxscramper haxscramper added this to the Sem phase refactoring milestone Nov 21, 2022
@saem saem deleted the saem-qw-06-pragmas-type-pragmas-must-follow-generic-params branch January 22, 2023 18:42
@haxscramper haxscramper added the simplification Removal of the old, unused, unnecessary or un/under-specified language features. label Feb 25, 2023
github-merge-queue bot pushed a commit that referenced this pull request Oct 19, 2023
## Summary
* Fix grammar nanny not compiling anymore
* Fix the grammar generator generating  `doc/grammar.txt`  in 
`compiler/ast/parser.nim`  
* Rerunning the grammar generator fixed the grammar update from
#400 /

edc3656
not being reflected in  `grammar.txt`  and thus the manual

## Details
*  `tools/grammar_nanny`  was just missing an import for the internal
reports after those had been split out
* The grammar generator expected the parser to be at 
`compiler/parser.nim`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
simplification Removal of the old, unused, unnecessary or un/under-specified language features.
Development

Successfully merging this pull request may close these issues.

None yet

3 participants