-
Notifications
You must be signed in to change notification settings - Fork 54
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
Move src
, test
, and app
directories into a code
directory
#2015
Comments
There is fd --glob '*.hs' # or fd '.*\.hs' or fd --extension hs
I would not mind moving the folders closer, though I would prefer cleaning up the top level. For example, it should be possible to move some of the CI configuration files to |
Can you elaborate on when and why we would want to use such commands? To me, this seems to be optimizing for something that's not a big deal to me, but would make my day-to-day experience navigating the codebase slightly worse. |
We could probably easily move everything in |
Say, if I want to count lines in files. Or the various scripts that require the paths to
I'd like to understand this more. I would think this path change should be rendered essentially transparent by IDE use. |
I mean, once I have an IDE open, sure. I just tend to spend a lot of time in the terminal. It's not that uncommon for me to type in the name of a .hs file I want to edit, or to navigate around with I should also point out this would make the repository slightly harder to navigate for newcomers --- e.g. anyone looking for a test suite would normally look for a folder called These inconveniences are minor, to be sure. But it seems like the benefits would be minor as well, so I'm not sure how to judge between them. |
At the risk of spilling ink disproportionate to the payoff (but all in good fun):
It seems to me that the CLI navigation cost is by far dominated by the rest of the filepath? This is the cost one commits to when eschewing an IDE, where only six or seven keystrokes are required (e.g. CTRL+p search in VS Code), regardless of module depth. With respect to newbies, I'm hard-pressed to envision a scenario in which tests inside About conventionThe defaults of
and for "application code", choices between:
So the "developer orientation" value in strict adherence to the defaults is questionable. As it stands, I'd argue that a Quantitative benefitWe might contrast the hypothetical cost to developer onboarding vs. the concrete benefit established in #2020. Aside from simplifying the ad-hoc CLI queries described above, there are already three places in our codebase that are simplified, including one fixed bug:
One should extrapolate this benefit further as the codebase grows. |
@kostmo just to be clear, you want to move only Haskell code to If it is the former, I would much rather install |
I guess I could settle for moving unless we can move On the topic of unix tool replacements, I am reminded that I should also reinstall ripgrep ( |
OK, I guess I'm convinced that the downsides would not be that bad. And it's really a rather silly thing to argue about, so I won't oppose this change, though it still feels to me like something that should be solved with better tools rather than reorganizing the codebase. |
Thanks for humoring me 😄
I hypothesize that feeling relates to status quo bias or appeal to tradition. Consider this framing: one can either have "simple data organization" that necessitates only "simple tools", or have "complex data organization" that must be compensated for by "complex tools". |
Hmm, perhaps! Although an alternative framing would be: one can either use "complex data organization" just so that "simple tools" work, or use "simple data organization" and create "complex tools" to go with it. Perhaps the reason I was initially opposed to this is that it felt like making things easier for our tools at the expense of making things more complex for ourselves, which seems exactly backwards. However, I understand your point that we are the ones who have to create and maintain the tools, so this distinction is actually not so clear-cut. |
I can't shake the feeling that moving only Haskell code optimises for a specific few command line invocations that fail to provide something like @kostmo would you mind waiting to try other approaches mentioned here first? I should have some time on weekend. 🙂 Anyway it might be good idea to make release before this. |
Ah, but in entropic terms, I'd argue that the proposal qualifies as "simple data organization":
And it's precisely this lower entropy that facilitates simple tools. Or, to put it yet another way, the proposal has "stronger invariants" on the data. |
* move Mergify, Restyled, Haskell-CI and Pull Request template to `.github` * regenerate Haskell-CI file with the new path and new Haskell CI version * move CSpell from VSCode [Code Spell Checker](https://open-vsx.org/extension/streetsidesoftware/code-spell-checker) extension to `.vscode` This is a complementary top-level cleanup to #2015.
This is to simplify queries for
.hs
files, whether it be in IDEs or in the terminal, usingfind
.As is, the simplest
find
command includes unwanted build artifacts:whereas these could be excluded easily if all of the code lived underneath a single
code
directory:The text was updated successfully, but these errors were encountered: