Commit Graph

68 Commits

Author SHA1 Message Date
Robin Lambertz
fb69aceded Fix libraries migration (#876) 2023-10-04 18:57:16 +09:00
Robin Lambertz
e1c33d47d3 Support libraries in decomp.me (#843)
* Add script to download libraries, and download directx

* Add libraries endpoint

* Allow compiling with a library

* Add new libraries tab in frontend

* Add libraries support in CI

* Better look for the libraries

* Give pretty names to libraries

* Move Libraries to live under CompilerOpts

* typechecking hackery

* Make libraries trigger autorecomp and set the unsaved flag

* Fix libraryVersions

* Add new libraries download script to CI, docker and docs

---------

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2023-09-30 14:54:40 +09:00
Mark Street
4a2eabb345 Overhaul download py (#855)
* Add translations for ps1/maspsx compiler set

* Tell clang to compile and not link to remove need for lld binary

* Assume msdos assembler lives on PATH

* Overhaul download.py

* Attempt to fix docker ci

* Appease black

* Whoops, don't forget to detach

* Fix path to download.py

* fix perms (hack?)

* Add --platforms and --compilers args to download.py

* Try out --compiler dir arg for docker in ci

* Try to ignore that 500 error about image manifests

* it's --compilerS-dir

* Try again

* Try building our own podman (fallback to vfs when rootless)

* install distro 'podman' to get configuration (fixes fuse)

* mount /dev/fuse in ci

* dumb bugfix, .download_cache

* split compilers config out of download.py

* update poetry.lock

* Add psyq3.3 + psyq4.4 and migrate psyq4.3 scratches to psyq4.4

* docker_entrypoint.sh cleanup

* Try to protect against 'locating item named "manifest" for image with ID'

* better podman sanity check

* appease black

* use 'requests.get()' to grab remote image digest

* Update compilers repo to 'decompme/compilers'

* Fix description for psyq3.6
2023-09-20 16:37:35 +09:00
Ethan Roseman
347b4df652 Compiler refactor (2) (#852)
* Initial commit of organizing things

* some bugs

* fix bug?

* Fix issues in last PR
2023-09-14 23:46:43 +09:00
Ethan Roseman
caa803c661 Compiler refactor (#849)
* Initial commit of organizing things

* some bugs

* anudder

* smores

* fix bug?

* oopth

* strings
2023-09-12 06:40:08 +09:00
Ryan Burns
50f32004a8 Add 1.2.5n compiler, and use it for melee/pikmin (#807)
* Add 1.2.5n compiler, and use it for melee/pikmin

* Update compiler zip to include 1.2.5n

* migration

---------

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2023-07-16 16:53:23 +09:00
Ethan Roseman
ebd520c536 Add a way to manually mark a scratch as matching (fixes #401) (#804) 2023-07-10 13:40:59 +09:00
triph
b96444e172 Add ee-gcc2.9-991111-01 compiler (#787)
* Add ee-gcc2.9-991111-01 compiler

* Move ee-gcc2.9-991111 to 991111a, add ee-gcc2.9-991111 compiler

+ remove old Windows 2.9-991111 build from ps2_compilers archive

* Move ee-gcc2.9-991111 presets to 991111a
2023-06-20 06:53:51 +09:00
Ethan Roseman
796a5f4746 Updates, problems panel bugfix (#745)
* Backend updates, mypy fixes

* new migration (oops), some fixes

* Frontend updates

* cleanup

* Prevent problems panel from starting open if there are no problems

(fixes #703)

* update again

* oopz

* stylelint

* Update checkout version

* Fix test

* Fix test - device.ts still being used on the server :/

* fix cod
2023-05-08 23:56:45 +09:00
Luciano Ciccariello
8a5de1d2f0 Add PSY-Q 3.5 and PSY-Q 3.6 compilers for PlayStation 1 (#651)
* Download PSY-Q 3.x compilers

* Add PSY-Q 3.3 and PSY-Q 3.6 PlayStation 1 compilers

* Remove gcc2.6.3-mipsel for good

* Actually install compilers

* Clean-up psyq-msdos folder after downloading it

* Map /proc to allow dosemu2 to run

* Allow to compile with PSY-Q 3.6

* Remove debugging stuff

* Add PSY-Q 3.5 and remove 3.3

* Let ASPSX to be quiet

* Completely replace PSY-Q 3.3 with 3.5

* Modify Castlevania preset

* Add migration from gcc2.6.3-mipsel to psyq3.6

* clean-up

* Typo

* Install DOSEMU in the CI

* Group ENABLE_PS1_SUPPORT set-up

* fix migration script

* Unset the HOME directory globally

* New line

* undo more auto-formatting

* Remove unnecessary comment

* fix

* More autoformatting shenanigans

* Try to fix CI pipeline

* Fix download script

* lint

* lint

* Fix dosemu setup

* Speed-up PSYQ MSDOS compiler

* debugging stuff for the tests

this commit will be reverted

* testing sandbox thingie

* Revert "debugging stuff for the tests"

This reverts commit 6d026b9214.

* Trimming down what Sandbox mounts

* Mount all /dev but read only
2023-02-24 21:40:31 +09:00
Ethan Roseman
6efceba430 Update dependencies and black (#669) 2023-02-02 02:05:31 +09:00
Ethan Roseman
9651b7dcf2 A few issues (#603)
Fixes #312 - removes login event from plausible
Fixes #249 - adds the course db models
Fixes #583 - allow viewing target asm even when the scratch doesn't
initially compile

Update frontend & backend deps
2022-12-14 23:40:41 +09:00
Alex Bates
2e96373ac7 Projects list, creation, settings pages (#542)
* add projects list

* new project page

* mypy

* allow '.' in github identifiers

* implement project create

* project settings

* disallow anons from being project members

* uploadable project icon

* docker attempt

* fix tests

* add tests

* add description form

* refactor to add useEntity and FieldSet

* move FieldSet out of subdirectory

* use same page for project tabs

* scroll up to UnderlineNav when tab changes

* stylelint

* configure vscode mypy extension

* mypy

* fix mypy and dmypy

dmypy does not support follow_imports=silent. Instead we explicitly
disable most checks for asm_differ and m2c, which
has the same effect

* remove redundant mypy flags

* FieldSet style tweaks

* give UnderlineNav horiz padding

* fix swr mutate of project header

* few tweaks to help docker (#550)

* eth changes

* use POST/DELETE rather than PUT for project members

* add migration

* fix pr creation

* simplify project platform derivation

Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2022-10-07 20:12:18 +09:00
ConorB
a473143fee Nicknames for anonymous users (#513)
* Begin implementing random pseudonyms for anonymous users

* Switch pseudonyms from [Adjective] / [Person] to [Adjective] / [Animal]

* Have the migration assign all users pseudonyms
(instead of lazily upon profile use)

* Tweak path handling, None checks
2022-08-30 22:24:12 +09:00
Mark Street
d959da7795 Remove 'psyq gcc w/ gnu as' compilers (repoint scratches to psyq asse… (#496)
* Remove 'psyq gcc w/ gnu as' compilers (repoint scratches to psyq assembler version)

* update migration filter

* no need to download binutils for psyq anymore

* too many und_er_sc_ores
2022-07-29 16:02:20 -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
1e435c3ed3 More proper diff_label fix with a test (#475)
* More proper diff_label fix with a test

* 'fix' mypy

* suggestions

* fix type checking for lru_cache

* Return type annotation for Sandbox __enter__

* thanks comment

* remove unnecessary part of test

* remove test
2022-06-12 21:03:24 +09:00
Ethan Roseman
90b7443b5f make migration use less memory 2022-06-12 16:40:03 +09:00
Ethan Roseman
4aee74ac78 Fix scratches with null diff_label 2022-06-12 16:35:11 +09:00
alex
9b31c9ebb8 Add family page & diff label editor (#438)
* add 'parent' url to TerseScratchSerializer

* add family page

* link to family in AboutScratch

* bump react-laag

* ui to edit diff label

* use User-Agent Client Hints API if supported

* fix pwa icons

* use carets instead of slashes between breadcrumbs

* use breadcrumbs on project function page

* fix save problem

* allow diff_label on compile

* a

* change placeholder

* new diff flags fix

* diff flags stuff

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2022-04-13 23:21:40 +09:00
Anghelo Carvajal
231842b545 Allow specifying custom objdump flags (#427)
* Trying to add a new section

* objdump section is no longer borken

* objdump section is a bit more independent from the compilerargs one

* add objdump_flags to database

* Allow to save objdump flags on change

* Actually pass the objdump flags to objdump

* Allow adding objdump flags to presets

* add short description to compilers.json

* filter_objdump_flags

* Introduce GCCMIPSCompiler class

* Add -M gekko / broadway by default for gc/wii compilers

* format autogenerated file

* type annotation

* Disable enum trailing comma warnings on Majora's Mask

* wip

* flags as array, backend parsing, frontend cleanup

* style scratch options

* loose ends

* only show diff opts section if there are any options to show

* fix mypy

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
Co-authored-by: Alex Bates <alex@nanaian.town>
2022-04-05 22:19:04 +09:00
Ethan Roseman
8ea10ca286 CodeMirror & PresetSelect fix (#413)
* yarn upgrade

* update eslint no-multiple-empty-lines rule

* update Next.js & React

Resolves #358.

* use CodeMirror in scratch editor

* use codemirror on new page

* move extensions out of CodeMirror component

* grow scratch codemirror

* fix state bug

* initial theming

* fix scratch page SSR

* fix credits page rendering

* max width for AsyncButton error popup

* word wrap

* bye monaco

* cleanup

* style scrollbars everywhere

* tab stuff

* updates

* more

* update codemirror theme

* new react, backend deps, preset on scratch, bugfixes

* improve monospace areas

* store preset name on scratch

* stylelint

* mypy

* mypy 2

* monospace

* fix monospace

* add padding to editor

* fix saving

* fix selection colours

* Highlight assembly line on source selected line change (#416)

Co-authored-by: Alex Bates <hi@imalex.xyz>

* mypy & black

* font stuff

* remove courier new

* make diff style consistent with editor

* fix codemirror exception when editing eof

* attempt to reduce layout thrashing

* /new: store presetName in localStorage

* use react-window for diff

* link diff column scroll position

* hide double scrollbar

* increase overscan

* pointer-events:none on diff header

* fix diff header thing

* make diff columns non-draggable

* dont shrink tabs

* add draggable bar between diff columns

* remove log

* fix 2-col mode

* fix diff align

* DiffCell support cell=undefined

* drag better

* style .cm-search

* eth style changes

* reduce rerenders when dragging diff bar

Co-authored-by: Alex Bates <hi@imalex.xyz>
Co-authored-by: hatal175 <hatal175@users.noreply.github.com>
Co-authored-by: Alex Bates <alex@nanaian.town>
2022-03-31 22:22:39 +09:00
Ethan Roseman
6b1ee90acd Compiler/platform refactor (#396)
* foyst

* clang & agbcc

* more

* wii/gc

* more

* fix

* more

* references

* fixes

* CI fix

* nabbed em

* gcc2.7.2kmc

* meowp

* Tweak Dockerfile + other bits (#398)

* Tweak Dockerfile + other bits

* Capitalise

* Enable/disable compiler downloads via Environment variables

* appease black

* migration

* flags / presets in Compiler

* fixed tests

* /compilers

* mypy cheese

* upd8s

* name

* frontend goodness

* i18n

* cleaners

Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
Co-authored-by: Mark Street <streetster@gmail.com>
2022-03-14 02:33:19 +09:00
Mark Street
9bb8765df3 Use psyq assembler (#376)
* Add psyq4.0

* Add psyq4.3 -> gcc2.7.2-psyq migration

* re-adding changes I rebased away...

* fix typo

* Add -quiet to 2.6.3-mipsel and use simple cpp

* fixup PR comments

* ensure scratches with old psyq compilers use new compiler ids

* Appease black
2022-02-22 02:19:54 +09:00
Ethan Roseman
4754df225a Update 0016_give_scratches_project_functions.py 2022-02-21 16:59:56 +09:00
Ethan Roseman
93792f30a9 third time = the charm 2022-02-21 02:52:13 +09:00
Ethan Roseman
6d1d2369ef oopz2 2022-02-21 02:51:29 +09:00
Ethan Roseman
cb00f2db76 oopz 2022-02-21 02:50:02 +09:00
Ethan Roseman
b24784b61a Fix fork bug (#383)
* fix bug (fug)

* mypy

* rename
2022-02-21 02:27:51 +09:00
Alex Bates
65f5685870 Add project descriptions (#381)
* add project description to db
* display project description & repo link on frontend
* add PUT/PATCH project-detail
2022-02-20 14:42:36 +00: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
Alex Bates
e764bfcebd split models.py into submodules (#359) 2022-02-18 03:47:04 +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
a50e0435a5 Increase the max length of the scratch name field 2021-12-31 01:27:24 +09:00
Ethan Roseman
02c28c49ff Increase diff_label max to 512 chars 2021-12-04 20:24:46 +09:00
Ethan Roseman
2abfbe07fb Remove Compilation (#212) 2021-11-21 02:33:18 +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
Ethan Roseman
bf1a8bed6d Backend stuffs (#190)
* Require and validate compiler on scratch creation (fixes #164)

* git subrepo pull backend/mips_to_c

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

* git subrepo pull backend/asm_differ

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

* Add max_score, remove original_context, compiler m2c flag

* Rename cc_opts to compiler_flags across the board (fixes #168)

* Rename cc_opts to compiler_flags across the board (fixes #168)

* PR comments, squash migrations
2021-10-26 21:14:48 +09:00
Mark Street
157acc3fa1 Move from 'arch' to 'platform' (#177)
* Move from 'arch' to 'platform'

* Fix linting / github actions failures

* PR feedback

* rebase against main

* update asm_prelude for ps2
2021-10-16 16:06:57 +09:00
Ethan Roseman
7ee5acf8d8 Scratch name, score, and description (#162)
* Scratch name, score, description added

* Fix .gitignore

* test

* error

* comment

* new ido recomp release

* mypy

* Fix ido errors

* update score on creation and fork

* test for creation

* empty name if no label

* remove return

* ensure arch order from API
2021-10-14 01:34:16 +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
Simon Lindholm
d20fef1464 Cope with mypy-typechecking asm-differ/m2c 2021-09-06 15:39:13 +02:00
alex
b3dc1aea30 link request profile and user automatically 2021-09-02 23:11:59 +01:00
alex
60c23c3cc4 use django User model 2021-09-02 17:27:07 +01:00
alex
08eb3f27cb squash migrations 2021-08-28 01:22:59 +01:00
alex
3797395d3a add GitHub login 2021-08-27 18:01:21 +01:00
Ethan Roseman
6abeb432bf fix Asm cache bug, remove as_opts 2021-08-27 01:05:51 +09:00
Ethan Roseman
0c96ef7e27 redo migrations for one last time (TM) 2021-08-26 22:48:03 +09:00
Ethan Roseman
d408e80210 working on default compiler opts 2021-08-25 05:06:58 +09:00