-
Notifications
You must be signed in to change notification settings - Fork 47
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
SAOC 2023: replace libdparse with dmd #589
Draft
snprajwal
wants to merge
24
commits into
dlang-community:master
Choose a base branch
from
snprajwal:saoc-2023
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
34174ba
chore(deps): add dmd library
snprajwal 61206bc
refactor: lexer in `tokens.d`
snprajwal 806e758
refactor: lexer in `indentation.d` and `wrapping.d`
snprajwal 6c1c543
feat: make it compile with dmd AST
snprajwal 3ac8e5a
feat: implement visitors and writers
snprajwal decdc79
fix: add indentation logic
snprajwal ded6e8d
fix: iron out some bugs
snprajwal 90c9040
feat: add 4 transformations
snprajwal 62e47bb
feat: add `dfmt_space_after_keywords`
snprajwal b4e36d9
feat: add `dfmt_selective_import_space`
snprajwal 07bfe5c
feat: add brace styles
snprajwal 14024a5
feat: add `dfmt_compact_labeled_statements`
snprajwal 0259887
feat: add `dfmt_space_before_named_arg_colon`
snprajwal 0897c83
feat: non-conditional template constraints styles
snprajwal 3b80011
chore: make it compile with latest DMD
snprajwal 16028a8
fix: store unit tests in AST
snprajwal 6e97ea8
feat: track line length
snprajwal 7f81285
feat: conditional template constraint style
snprajwal 3eb0928
chore: run dfmt on all files
snprajwal 90bb91d
fix: use temporary buffer for conditional newline
snprajwal 6ef9fba
chore: revert changes to README
snprajwal 325f093
feat: add `dfmt_split_operator_at_line_end`
snprajwal 864caad
feat: add `dfmt_single_template_constraint_indent`
snprajwal b845d96
fix: boolean logic for line split
snprajwal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[submodule "libdparse"] | ||
path = libdparse | ||
url = https://github.com/dlang-community/libdparse.git | ||
[submodule "stdx-allocator"] | ||
path = stdx-allocator | ||
url = https://github.com/dlang-community/stdx-allocator | ||
[submodule "d-test-utils"] | ||
path = d-test-utils | ||
url = https://github.com/dlang-community/d-test-utils.git | ||
[submodule "dmd"] | ||
path = dmd | ||
url = https://github.com/dlang/dmd.git |
This file contains 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
Submodule libdparse
deleted from
fe6d1e
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might
dmd -i
be useful here? This makes you quite brittle towards upstream changes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm not really sure about keeping these changes, because they refused to work once I started using
ASTCodegen
. I tried a bunch of things to fix it, but didn't manage to make it work. dmdfmt currently works withdub build
, but the Makefile itself is pretty broken. Even with every single D file in DMD included, it would die during linking.