-
Notifications
You must be signed in to change notification settings - Fork 39
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
Sort compiler files into more manageable structure #177
Conversation
god's work. |
6d9bcb5
to
299cd8b
Compare
Also sorting out all stdlib imports into compiler and making them use |
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.
Did an initial scan mostly ok, but one thing is nagging me:
If we have imports like compiler/foo
then that implies we could just as easily end up with testament/bar
as an import. At least right now we'd spot the ..
and know it's broken more easily than a myriad of directories one might import.
I don't think we should start from the root instead we should be within the compiler and std is just nim itself bringing in the standard library. Hell I'd argue that we should disable relative import by default and people should have to enable it as a special case -- separate PR.
export int128 | ||
compiler/ast/[ | ||
lineinfos, # Positional information | ||
idents, # Ast identifiers |
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.
Sorry I fell really compelled to be nitpicky here -- just because it's going to end up everywhere.
Can we align the comments so all the starting # line up in instance where we gave lists like this?
5310cc2
to
8e6087b
Compare
About vertical spacing:
<<<<<<< HEAD:compiler/cli_reporter.nim
import reports,
ast,
types,
renderer,
astmsgs,
astalgo,
msgs,
lineinfos,
nilcheck_enums,
vm_enums,
platform,
nversion
import options as compiler_options
import std/[
strutils, terminal, options, algorithm,
sequtils, strformat, tables, intsets,
json
]
=======
import
std/[
strutils,
terminal,
options,
algorithm,
sequtils,
strformat,
tables,
intsets,
json
],
ast/[
lineinfos,
astalgo,
astmsgs,
renderer,
types,
ast,
reports
],
front/[
msgs
],
sem/[
nilcheck_enums
],
vm/[
vm_enums
]
>>>>>>> 8e6087ba9 (.):compiler/front/cli_reporter.nim |
16942b1
to
9c33e2a
Compare
bors try |
tryBuild failed: |
Organized compiler source code into smaller sections - if we plan to untangle implementation parts from each other, we can start small, with simple file organization and later continue to remove unnecessary cross-directory imports and so on.
9c33e2a
to
a67e45e
Compare
bors try |
tryBuild succeeded: |
Can be merged, and since this will bitrot really quickly (due to modification of all imports) better done soon. |
Bors r+ |
Build succeeded: |
- Removes main drnim directory along with all the hacks added into `sem*` implementation - special keywords for `ensures/requires/assume/invariant`, more logic built into sempass and so on. Sem reports that were added in the main compilation. - External tooling for code analysis should better be implemented via completely external modifications, instead of clobbering the main compiler codebase with logic for barely functioning tooling. With dod refactor this task becomes much easier, since extra metada can be attached to any symbol. - We definitely want to move in the direction of automatic code correctness and static analysis, but right now this is not a priority, and considering dubious implementation of the tool it would be easier to remove it for now and come up with a proper implementation later on, or wen can turn all hacks back into sem. - Not testsed as a part of CI so right now it can't even be built, due to file reorganization nim-works#177. - Adds reports for `--staticBounds:on|off` that were mistakenly assumed to be drnim-only during earlier refactor nim-works#94 for structured reports. Closes nim-works#130 as this pull removes `drnim` as well, and the author of that PR is no longer responsive. Due to multiple merge conflicts it is highly unlikely the old PR will be revived.
- Removes main drnim directory along with all the hacks added into `sem*` implementation - special keywords for `ensures/requires/assume/invariant`, more logic built into sempass and so on. Sem reports that were added in the main compilation. - External tooling for code analysis should better be implemented via completely external modifications, instead of clobbering the main compiler codebase with logic for barely functioning tooling. With DOD refactor this task becomes much easier, since extra metadata can be attached to any symbol. - We definitely want to move in the direction of automatic code correctness and static analysis, but right now this is not a priority, and considering dubious implementation of the tool, it would be easier to remove it for now and come up with a proper implementation later on, or when can turn all hacks back into sem. - drnim itself not tested as a part of CI so right now it can't even be built, due to file reorganization nim-works#177. - Adds reports for `--staticBounds:on|off` that were mistakenly assumed to be drnim-only during earlier refactor nim-works#94 for structured reports. Closes nim-works#130 as this pull removes `drnim` as well, and the author of that PR is no longer responsive. Due to multiple merge conflicts it is highly unlikely the old PR will be revived.
- Removes main drnim directory along with all the hacks added into `sem*` implementation - special keywords for `ensures/requires/assume/invariant`, more logic built into sempass and so on. Sem reports that were added in the main compilation. - External tooling for code analysis should better be implemented via completely external modifications, instead of clobbering the main compiler codebase with logic for barely functioning tooling. With DOD refactor this task becomes much easier, since extra metadata can be attached to any symbol. - We definitely want to move in the direction of automatic code correctness and static analysis, but right now this is not a priority, and considering dubious implementation of the tool, it would be easier to remove it for now and come up with a proper implementation later on, or when can turn all hacks back into sem. - drnim itself not tested as a part of CI so right now it can't even be built, due to file reorganization nim-works#177. - Adds reports for `--staticBounds:on|off` that were mistakenly assumed to be drnim-only during earlier refactor nim-works#94 for structured reports. Closes nim-works#130 as this pull removes `drnim` as well, and the author of that PR is no longer responsive. Due to multiple merge conflicts it is highly unlikely the old PR will be revived.
- Removes main drnim directory along with all the hacks added into `sem*` implementation - special keywords for `ensures/requires/assume/invariant`, more logic built into sempass and so on. Sem reports that were added in the main compilation. - External tooling for code analysis should better be implemented via completely external modifications, instead of clobbering the main compiler codebase with logic for barely functioning tooling. With DOD refactor this task becomes much easier, since extra metadata can be attached to any symbol. - We definitely want to move in the direction of automatic code correctness and static analysis, but right now this is not a priority, and considering dubious implementation of the tool, it would be easier to remove it for now and come up with a proper implementation later on, or when can turn all hacks back into sem. - drnim itself not tested as a part of CI so right now it can't even be built, due to file reorganization nim-works#177. - Adds reports for `--staticBounds:on|off` that were mistakenly assumed to be drnim-only during earlier refactor nim-works#94 for structured reports. Closes nim-works#130 as this pull removes `drnim` as well, and the author of that PR is no longer responsive. Due to multiple merge conflicts it is highly unlikely the old PR will be revived.
- Removes main drnim directory along with all the hacks added into `sem*` implementation - special keywords for `ensures/requires/assume/invariant`, more logic built into sempass and so on. Sem reports that were added in the main compilation. - External tooling for code analysis should better be implemented via completely external modifications, instead of clobbering the main compiler codebase with logic for barely functioning tooling. With DOD refactor this task becomes much easier, since extra metadata can be attached to any symbol. - We definitely want to move in the direction of automatic code correctness and static analysis, but right now this is not a priority, and considering dubious implementation of the tool, it would be easier to remove it for now and come up with a proper implementation later on, or when can turn all hacks back into sem. - drnim itself not tested as a part of CI so right now it can't even be built, due to file reorganization nim-works#177. - Adds reports for `--staticBounds:on|off` that were mistakenly assumed to be drnim-only during earlier refactor nim-works#94 for structured reports. Closes nim-works#130 as this pull removes `drnim` as well, and the author of that PR is no longer responsive. Due to multiple merge conflicts it is highly unlikely the old PR will be revived.
- Removes main drnim directory along with all the hacks added into `sem*` implementation - special keywords for `ensures/requires/assume/invariant`, more logic built into sempass and so on. Sem reports that were added in the main compilation. - External tooling for code analysis should better be implemented via completely external modifications, instead of clobbering the main compiler codebase with logic for barely functioning tooling. With DOD refactor this task becomes much easier, since extra metadata can be attached to any symbol. - We definitely want to move in the direction of automatic code correctness and static analysis, but right now this is not a priority, and considering dubious implementation of the tool, it would be easier to remove it for now and come up with a proper implementation later on, or when can turn all hacks back into sem. - drnim itself not tested as a part of CI so right now it can't even be built, due to file reorganization nim-works#177. - Adds reports for `--staticBounds:on|off` that were mistakenly assumed to be drnim-only during earlier refactor nim-works#94 for structured reports. Closes nim-works#130 as this pull removes `drnim` as well, and the author of that PR is no longer responsive. Due to multiple merge conflicts it is highly unlikely the old PR will be revived.
207: Unbundle drnim r=saem a=haxscramper - Removes main drnim directory along with all the hacks added into `sem*` implementation - special keywords for `ensures/requires/assume/invariant`, more logic built into sempass and so on. Sem reports that were added in the main compilation. - External tooling for code analysis should better be implemented via completely external modifications, instead of clobbering the main compiler codebase with logic for barely functioning tooling. With DOD refactor this task becomes much easier, since extra metadata can be attached to any symbol. - We definitely want to move in the direction of automatic code correctness and static analysis, but right now this is not a priority, and considering dubious implementation of the tool, it would be easier to remove it for now and come up with a proper implementation later on, or when can turn all hacks back into sem. - drnim itself Not tested as a part of CI so right now it can't even be built, due to file reorganization #177. - Adds reports for `--staticBounds:on|off` that were mistakenly assumed to be drnim-only during earlier refactor #94 for structured reports. Closes #130 as this pull removes `drnim` as well, and the author of that PR is no longer responsive. Due to multiple merge conflicts it is highly unlikely the old PR will be revived. Co-authored-by: haxscramper <haxscramper@gmail.com>
Organized compiler source code into smaller sections - if we plan to untangle implementation parts from each other, we can start small, with simple file organization and later continue to remove unnecessary cross-directory imports and so on.
current moved files:
directory structure
for now this is just a placeholder, so comment on the file movements, and general directory structure, and when we are ok with this, I will do a full compiler import fix.