Commit Graph
31 Commits
Author SHA1 Message Date
Dana Jansens 18d99350a9 Add a --remote switch to new_proposal.py (#4681)
If the user's fork is not named 'origin' then the script will fail and
needs to know the user's remote name.

Fixes #1899
2024-12-13 15:46:27 +00:00
Jon Ross-Perkins 6204a27ea9 Start adapting to bzlmod configurations. (#3505)
Some background information is at https://bazel.build/external/migration

Trying to handle the simple cases first. This adds a requirement for
bazel 7 due to differences in bzlmod handling between 6 and 7 (also
discussed on
[#infra](https://discord.com/channels/655572317891461132/707150492370862090/1184942191412510720)).
Bazel seems to be okay with a partial migration such as ths.

The python import behavior has subtly shifted, so `carbon.` is no longer
part of import paths. There's a version-incompatible change for `@@`.
bzlmod makes repos sometimes show as `name~version`.

`target-determinator` seems to be okay with `@@` after a version update.

Things not moved here are things that basically need more dep work:

- clang_register_toolchains because I need to dive into its format.
- llvm-project because we need something slightly atypical, I need to
make sure patching and the repo work carries over.
- com_google_libprotobuf_mutator is sufficiently atypical that it
doesn't have a module already, but should be one of the easier things to
fix.
- brotli/woff2: I think we should actually consider removing these. But
again, they're not trivial moves.
- treesitter due to toolchain registration, which has shifted a bit.
- rules_nodejs because treesitter depends on it in an awkward way to
migrate.
2023-12-15 01:05:35 +00:00
Jonathan B. CoeandChandler Carruth 8c28a0494e Add size="small" to test targets where advised (#3326)
Running `bazel test //...` reported:

```
Test execution time outside of range for MODERATE tests.
Consider setting timeout="short" or size="small".
```

This change adds size="small" to avoid such warnings being reported.

---------

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2023-10-24 06:52:00 +00:00
Jon Ross-Perkins 605763d62d Add lint fixes to the buildifier setup. (#3109)
The main motivation for this is to get python loads in using the
`native-py` lint fix. However, enabling that made me wonder, maybe we
should fix in general?

`native-cc` is delayed, but not wholly cancelled (and `native-py`
picking up might indicate `native-cc` won't be too far behind). There's
also some automated fixes for `.append` and dict sorting -- this felt
okay to me, maybe not something to eagerly add but probably not worth
stopping buildifier from fixing (I've noticed the warnings in the past
and had been ignoring them).

Running everything does mean that load orders are sorted automatically
now, which I think is a positive. Most generally, I think these fixes
aren't _harmful_, and having them done automatically seems beneficial:
my biggest concern about `native-py` and `native-cc` was actually that
regressions wouldn't be caught, but this addresses that issue
automatically.
2023-08-22 21:01:42 +00:00
josh11b e941b90ac9 Correctly remove ## TODO section from proposals (#2207)
Fix bug introduced in #2139
2022-09-22 08:20:07 -07:00
josh11b e489b14de0 Fix new_proposal.py to include "Abstract" section (#2139)
"Proposal" was hard-coded as the first section and so it was deleting the "Abstract" section along with the "TODO" section.
2022-09-01 14:21:04 -07:00
David Sankel ea0a37dbf3 Add Abstract Section (#1895)
Reading through extensive problem and background documentation before seeing
what is being proposed is tedious for a reader. An abstract section at the
beginning of a document that provides a succinct summary helps a lot. We
propose adding such a section to our proposal template.
2022-08-26 11:49:25 -07:00
Jon Ross-Perkins 065d5224be Remove reviewer setting, let autoassign take over (#2094)
Fixes #1841

The current autoassign doesn't work, but I'm trying to fix it (e.g., #2093)
2022-08-23 12:13:41 -07:00
Jon Ross-Perkins 9b3f80c6d6 Switch proposal process from projects to labels (#1981)
This is being done because Projects v1 requires repo write access, a serious limitation for letting people use it. Projects v2 isn't a great option because it lacks event support. Labels are pretty stable in GitHub, so this switches to that.

Note this assumes we're fine renaming "decision: accepted" -> "proposal accepted", etc. There are two reasons for this:

1) To make it clear that this is a proposal-specific label, versus something like an issue for leads label.
2) Removing the colon because it was causing trouble with yaml syntax.

This also adds the "proposal draft" label, mainly to complete the taxonomy.

I was considering whether this should be a proposal itself, but it feels like maybe it's not necessary because it's a fairly low-key infrastructure change, and I'm not sure how much people were relying on the project board anyways.

I tested this in a personal repo, basically just poking at https://github.com/jonmeow/test/pull/2
2022-08-12 11:11:09 -07:00
Jon Ross-Perkins b9e6f82f5d Remove project flag (#1939)
Contributors can't do this right now (requires repo write permissions), need to investigate as part of #1898 (projects v1 vs v2 results may differ)
2022-08-06 14:22:37 -07:00
Jon Meow 107848e30f Switch mypy approach to pre-commit (#1234)
I'm treating my PR to mypy bazel integration as dead in the water. Abandoning that approach, this seems to work reasonably well as a replacement. It's actually a slightly newer version of mypy too -- the bazel integration was stuck on an old version.

Note I don't think we're losing much: we shouldn't be writing too much python.
2022-05-09 09:54:12 -07:00
Geoff Romer 37a0e35b31 Clarify that rationale can cite principles (#1153) 2022-03-28 11:59:04 -07:00
josh11b 8f6e42d866 Add --repo to gh pr create in new_proposal.py (#1110) 2022-02-25 18:48:09 -08:00
Jon Meow ffc2be92d6 Add carbon to a couple python imports for correctness (#1033) 2022-01-20 08:37:47 -08:00
Jon Meow 563201a849 Remove proposals/BUILD, moving template.md under scripts (#846)
With #842 there's not as much reason for the BUILD anymore, maybe move the template.md file and get rid of it?
2021-09-23 09:16:19 -07:00
Richard Smith 45ea240942 Replace proposal list generation script with a link to a github query. (#842)
This aims to avoid merge conflicts when adding new proposals.
2021-09-22 12:25:14 -07:00
Jon Meow 3351443c8f Switch to a mypy fork that handles imports (#823)
I'm seeing if I can upstream thundergolfer/bazel-mypy-integration#43, but we can also point at my fork for the time being.

This should resolve conflicts with mypy treating imports as non-hermetic, creating inconsistent behavior if packages are/aren't installed locally.
2021-09-13 13:08:54 -07:00
Jon Meow 33daf64329 Remove explicit py_* loads (#781)
Per https://groups.google.com/g/bazel-discuss/c/XNvpWcge4AE/m/aJ-aQzszAwAJ
2021-08-26 09:57:27 -07:00
Jon Meow 5fa513992c Add mypy annotations to proposals scripts (#783)
Renames proposals to proposal_list because the module name conflicts with the directory name
2021-08-26 09:27:49 -07:00
Jon Meow d550256c93 Delete the website and references (#782)
.pre-commit-config.yaml and proposals/p0540.md (linking goals.html, fixed to goals.md link) are the two references I could find.

The site is disabled, though; I think it makes the most sense to delete supporting code, and in the future hopefully we can use GH pages to publish.
2021-08-25 14:15:01 -07:00
a6ddc03aa6 Generics goals (#24)
The "generics" feature of Carbon is a large design effort that needs to be broken up into manageable steps. The first thing we need is a high-level goals document. The goals here reflect the desirable properties that we have discovered as part of considering several alternative generics designs:

-   Use cases:
    -   Generic programming
    -   Upgrade path from C++ abstract interfaces
    -   Dependency injection
     -   Generics instead of open overloading and ADL
-   Performance
-   Better compiler experience
-   Encapsulation
-   Predictability
-   Dispatch control
-   Upgrade path from templates
-   Coherence
-   No novel name lookup
-   Learn from others
-   Interfaces are nominal
-   Interop and evolution
-   Bridge for C++ customization points

Goals are summarized in [this presentation](https://docs.google.com/presentation/d/12yGyu5Pvdag7CJp-_yLVkmbhyvuRIilBTNlkO0LKaHo/edit?usp=sharing&resourcekey=0-JB9yrUO4-6J8-zzGhnIyNg).

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
Co-authored-by: Matthew Riley <mdriley@gmail.com>
Co-authored-by: austern <austern@google.com>
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2021-04-23 17:19:23 -07:00
Jon Meow 33360a30bc Shift new proposal setup to the new process. (#468) 2021-04-19 16:43:01 -07:00
Jon Meow d60389babd Stop generating decisions into the proposal index (#462) 2021-04-14 15:14:43 -07:00
josh11b 160c5d06d3 Update new_proposal script with --branch-start-point (#450)
* Allow configuration of start point.

* Use git switch --create.

* Maybe fix string type.

* Fix wrong flag.

* Add --dry_run flag.

* Not sure if this is needed.

* Dry run should be safe even with uncommitted changes.

* Remove side effects with --dry_run.

* Checkpoint progress.

* Make `dry_run` parameter optional so tests pass.

* Implement suggestions from code review.

* Checkpoint progress.

* Remove new dry_run_pr_number option.

* Rename --start_point to --branch_start_point.
2021-04-12 19:46:33 -07:00
Chandler Carruth 21917095a3 Add a parameter to fix a failing python test. (#303)
This fixes a python test failure for me.
2021-02-26 09:18:19 -08:00
Jon Meow c2f8e382d0 Add links to new proposals (#283) 2021-02-23 15:42:23 -08:00
Jon Meow ef6505a624 Get rid of the website symlink forest (#234) 2020-12-29 17:34:08 -08:00
Jon Meow 1e8930e21b Bazelify the jekyll handling. (#230)
- Shift some things around to adjust to being in bazel.
- Add separate build/serve/publish scripts for use by bazel (not set up for direct execution, but bazel requires +x).
- Fix some tests I noticed not running unittest.main as a result of the switch.
- Move md files into filegroups for build reuse.
- Disable automatic site publishing (now `bazel run //website/jekyll:publish`)

Site publishing seems like it'd be too much trouble to keep automated... The C++ toolchain essentially needs to be set up due to the repo config, along with syncing the LLVM submodules, etc. That seems a bit annoying to do on each run of the publish-docs action, and not something I really want to maintain. If we get a CI, we can focus on it more there, but this feels like it'd just be a one-off to maintain as a github workflow.
2020-12-29 15:15:24 -08:00
Jon Meow d76f8a1eff Bazel-ify most of the Python scripts. (#229) 2020-12-28 16:37:55 -08:00
Jon Meow f2d48f1bd0 Move the jekyll sidebar to a python script for consistent generation. (#205)
One implication here is that both proposals/README.md and the website should use basically the same format for their proposal lists. Another subtle change is that the website sidebar was previously sorted by *filename*, and is now sorted by *title*, which seems better because it's something that readers can see.

Enumerating why files change:

- gen_sidebar.py is the centerpiece, with a couple helpful functions for re-use elsewhere
- Delete the old sidebar html includes
- Modify the Makefile to handle gen_sidebar.py reasonably well (let's be honest... I'm not great at Makefiles)
- Move proposal listing out to its own file (proposals.py) for re-use
- Add a few PYTHONPATH things + `__init__.py` files to get modules importing correctly (may be a better way at this, I've hit a wall though).
2020-12-04 08:26:25 -08:00
Jon Meow cc4211442f Merge carbon-project-tools back into carbon-lang (#203)
As proposed at https://forums.carbon-lang.dev/t/merged-repo-structure/174:

- carbon-lang:/src/jekyll -> carbon-lang:/website/jekyll
- carbon-lang:/src/scripts -> carbon-lang:/proposals/scripts
- carbon-project-tools:/firebase -> carbon-lang:/website/firebase
- carbon-project-tools:/github -> carbon-lang:/github
2020-12-02 09:53:14 -08:00