Commit Graph

44 Commits

Author SHA1 Message Date
Ethan Roseman e67c36d5a7 Replace wine with wibo (#484)
* Remove wine from the project and reference WiBo

* Install wibo in ci, readme update

* Update Docker instance to Ubuntu 22.04 (#485)

* wibo 0.1.1

* remove unnecessary build args

* wibo 0.2.1

* wibo 0.2.1 in Dockerfile

Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
2022-07-23 11:59:30 -04:00
Ethan Roseman f50b3c32b8 disallow_untyped_defs for mypy (#477)
* Make mypy happy

* failing tests

* working

* use consistent annotation format

* remove comments
2022-07-03 23:43:59 +09:00
Ethan Roseman eb7534be0d Black (#380)
* Initial format

* action

* git subrepo pull --force backend/asm_differ

subrepo:
  subdir:   "backend/asm_differ"
  merged:   "ee239a2b"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ"
  branch:   "main"
  commit:   "ee239a2b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull --force backend/mips_to_c

subrepo:
  subdir:   "backend/mips_to_c"
  merged:   "6704d61f"
upstream:
  origin:   "https://github.com/matt-kempster/mips_to_c"
  branch:   "master"
  commit:   "6704d61f"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* vscode

* fix

* .
2022-02-20 23:21:38 +09:00
Alex Bates 1968531ca4 Projects MVP (#292)
Co-authored-by: Matt Kempster <kidpixel@gmail.com>
Co-authored-by: Mark Street <streetster@gmail.com>
2022-02-18 17:48:51 +00:00
Ethan Roseman 7f54b56f48 oopth 2022-02-16 13:18:19 +09:00
MonsterDruide1 d43fdfd5e6 Remove FRONTEND_BASE (#352) 2022-02-11 02:46:20 +09:00
Alex Bates b96dd0315d ScratchViewSet + search box (#285)
* initial scratch viewset impl

* use scratch2 on frontend

* todo

* viewset

* permissions

* fix mypy

* add TerseScratchSerializer

* mypy

* add FRONTEND_BASE

* add search box

* use get_html_url

* scratch default name

* always show search icon

* oops

* add platform icon to search results

* very oops

* improve searchbox stability

* fix requirements

* don't autosave on compiler change

* add Search to ScratchToolbar

* Nav frog padding tweak

* frog hover state

* click away bug

* fix weird search result click bugs

* recompile on visit another scratch
2022-01-04 03:00:12 +09:00
Ethan Roseman f929174399 Dummy compiler + better error handling and reporting (#246)
* Initial work on dummy compiler + better exception / error stuff

* mypy

* Add more dummy functionality, fix some error handling, and organize views

* Imports, suggestion

* force include the dummy compiler

* attempt to fix issues

* Fix docker?

* undo dumb

* suggestion

* sugg2

* Turn off sandbox on winders

* oops

* PR suggestions, a new test, cleanup

* mypy

* Front-end dummy compiler, logging fix

* new prod option that removes dummy

* Cleanup, fixes

* cleanup

* more cleanin

* PROD -> DUMMY_COMPILER, move dummy config out of fs

* DJANGO_LOG_LEVEL as environ setting

* fix Dockerfile

* suggestion

* dummy off
2021-12-26 20:30:21 +09:00
Mark Street fe97842e24 Hide wine's warnings (#210)
* Hide wine's warnings

* this is getting ridiculous

* Correcting backend Dockerfile

* here we go again

* removing 'f' from non-f string

* wine test & gha stuff

* Don't install mesa stuff

* Get wine test passing in Docker

* Backend docker test

* fixup pr.yaml (attempt 1 of N)

* fixup pr.yaml (attempt 2 of N)

* fixup pr.yaml (attempt 3 of N)

* fixup pr.yaml (attempt 4 of N)

* fixup pr.yaml (attempt 5 of N)

* fixup pr.yaml (attempt 6 of N)

* fixup pr.yaml (attempt 7 of N)

* fixup pr.yaml (attempt 8 of N)

* fixup pr.yaml (attempt 9 of N)

* fixup pr.yaml (attempt 10 of N)

* Updating Dockerfile to bullseye to match GHA builder

* Improve tests

* README.md update

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2021-11-21 23:23:39 +09:00
Ethan Roseman f5468a5c03 2 more things (#211)
* Ram cache for elf_object (fixes #207) and better diff label detecti
on / explanation (fixes #188)

* PR suggestions
2021-11-20 03:51:11 +09:00
Mark Street d320b2eec9 Enable compilers if content found in compiler directory (#181)
* Enable compilers if content found in compiler directory

* PR feedback
2021-10-16 20:53:33 +09:00
Alex Bates 0e8b01841a Frontend improvements + Docker updates (#167, #169)
Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
2021-10-14 12:52:28 +01:00
alex 7757386396 Migrate to Next.js + big style update (#154)
* Backend changes to diff from label rather than 0, also possibly fix #109

* implement diff_label frontend & fix assemble_asm

* Log stack trace if asm-differ fails

* don't return { obj } from api

* slight change in stub func code

* GET /compilers returns arches for compilers

* GET /compilers returns arches for compilers

* keep compiler_ids

* Obtain ido from download script, add comment for permuter api support

* Clean m2c wrapper code, add left pointer style, add test

* fix 3 tests

* list arches from api

* fix cookies in DEBUG

SameSite=None is incompatible with Secure, and this causes some browsers
to ignore the cookie altogether.

* fix test

Regression due to changing API to not return { "user": User } but
rather just the User object itself.

* fix create scratch without glabel

This works around a backend bug

* add label select on scratch creation

* show compilers/presets for current arch only

- fixes #92
- fixes #132

* fix mypy issues

* use react instead of preact

* hold pages in src/pages/

This matches NextJS file structure; the names of files reflect their routing paths.

* migrate to NextJS

* use next-pwa

* statically generate user page

* fix github login

* add loading progress bar

* arch on scratch

* nav redesign

* use .env.local instead of local.env

* fix unset compiler not considering arch

* add discord server to readme

* big styling update

* add footer

* move compiler dir into components

* use lib dir

* fix ts error

* describe deployment

* dont use NEXT_PUBLIC_* in .env

* add storybook

* document storybook

* make AsyncButton loading state pretty

* remove sharp

* custom monaco editor react component

* ci: build frontend

* allow nextjs to build despite ignored typescript errors

* ci

* remove react-loading-skeleton

* oops

* don't request public_repo github scope

* give AsyncButton error popup its arrow back

* try fix monaco problem

* oops

* fix monaco red bg for real this time

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2021-10-13 00:49:23 +09:00
alex 4e8b07efaa Diff from label (#151)
* Backend changes to diff from label rather than 0, also possibly fix #109

* implement diff_label frontend & fix assemble_asm

* Log stack trace if asm-differ fails

* don't return { obj } from api

* slight change in stub func code

* GET /compilers returns arches for compilers

* GET /compilers returns arches for compilers

* keep compiler_ids

* Obtain ido from download script, add comment for permuter api support

* Clean m2c wrapper code, add left pointer style, add test

* fix 3 tests

* list arches from api

* fix cookies in DEBUG

SameSite=None is incompatible with Secure, and this causes some browsers
to ignore the cookie altogether.

* fix test

Regression due to changing API to not return { "user": User } but
rather just the User object itself.

* fix create scratch without glabel

This works around a backend bug

* add label select on scratch creation

* show compilers/presets for current arch only

- fixes #92
- fixes #132

* fix mypy issues

* arch on scratch

* use .env.local instead of local.env

* fix unset compiler not considering arch

* fix compiler opts not displaying on first load if compiler is not gcc 2.8.1

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2021-10-12 00:59:33 +09:00
alex 537eff9a95 Merge branch 'main' into dotenv 2021-09-23 13:25:54 +01:00
Ethan Roseman 7c4feb72d6 Fixes #135 2021-09-23 14:41:54 +09:00
alex 230424b8ad fix mypy 2021-09-17 17:17:19 +01:00
alex 5f33326703 update readme and read from local.env 2021-09-17 17:10:06 +01:00
alex d2e76dedb1 fix mypy problems 2021-09-02 20:50:01 +01:00
alex 234d4a7b10 use PyGithub and disable CSRF checks 2021-09-02 17:52:17 +01:00
alex 60c23c3cc4 use django User model 2021-09-02 17:27:07 +01:00
alex 3797395d3a add GitHub login 2021-08-27 18:01:21 +01:00
alex da19467c10 support darwin 2021-08-25 23:30:57 +01:00
alex a75b679b93 disable CSRF checks on debug 2021-08-25 23:07:45 +01:00
Zach Banks e3f92a5fc5 Make sandbox easier to configure
- Read `USE_SANDBOX_JAIL` from `.env`
- Rename `SandboxWrapper` -> `Sandbox`
- Remove `--user`/`--group` from `nsjail` wrapper
- Refactor `Dockerfile` to build nsjail
2021-08-11 13:52:39 -04:00
Zach Banks 8281dd3a57 Run compiler commands in an nsjail 2021-08-10 23:11:14 -04:00
Ethan Roseman b6f34bc754 Compiler configuration refactor, CHANGELOG, etc 2021-08-08 21:00:03 +09:00
Ethan Roseman 4e0e0b2ef2 static file stuff 2021-08-04 16:37:29 +09:00
Ethan Roseman 04cdcdab56 fix env bug, minor styling 2021-08-04 15:55:56 +09:00
Mark Street c369e860dc Adding docker-compose.yaml 2021-08-03 19:14:06 +01:00
Ethan Roseman 2ff8279c84 settings cleanup 2021-08-03 20:10:28 +09:00
Ethan Roseman 7ec5239289 more settings through env 2021-08-03 19:48:45 +09:00
Ethan Roseman 93454f5c1f fix #22, don't show the diff still if there are compile errors 2021-08-03 19:15:32 +09:00
Alex Bates 9bbe68408f implement scratch ownership 2021-08-03 10:31:31 +01:00
Ethan Roseman 596187fea8 Various fixes, begin on Assembly 2021-07-29 23:03:04 +09:00
Alex Bates 8f59db5516 integrate scratch ui with new api 2021-07-07 19:09:30 +01:00
Ethan Roseman d9be168d14 Fully functional compilation with GCC 2021-07-07 00:48:01 +09:00
Alex Bates d1a11ab4d3 fixup api calls 2021-07-06 14:48:28 +01:00
Alex Bates 58613f80bc fix cors 2021-07-06 14:27:36 +01:00
Alex Bates fd93fe5bdf connect 'compile!' button to api 2021-07-05 20:47:24 +01:00
Ethan Roseman 9c96e65478 /api/compiler_configs/ endpoint 2021-07-05 21:47:22 +09:00
Ethan Roseman bf86243651 scratchpad template 2021-07-05 17:52:03 +09:00
Ethan Roseman dca2588c2e Start on the MVP 2021-07-04 00:15:51 +09:00
Ethan Roseman 57819051a8 Initial progress on django stuff + README 2021-07-02 15:01:26 +09:00