summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2020-12-22Create CODEOWNERS fileJohn Bampton
- You can use a CODEOWNERS file to define individuals or teams that are responsible for code in a repository. - Code owners are automatically requested for review when someone opens a pull request that modifies code that they own. Code owners are not automatically requested to review draft pull requests. - https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/about-code-owners - This creates a bit more automation so that after you merge this PR, next time someone submits a PR @matz will be automatically assigned as the PR reviewer as CODEOWNER - CODEOWNERS can even be assigned directories or file types
2020-12-21Merge pull request #5239 from jbampton/fix-linksYukihiro "Matz" Matsumoto
refactor: fix Rake link and fix missing HTTPS on links
2020-12-21Take advantage of gemboxdearblue
I think that it is easy to use if it is divided according to the type of library and the general purpose. It is a subdivision from the previous `default.gembox`. By type gembox: - `stdlib`: Add some standard Ruby methods not provided by core. - `stdlib-ext`: Add some standard Ruby methods that are not provided by `stdlib`. - `stdlib-io`: Provides `IO`, `File`, `Socket`, `print`, etc. Conflict with `MRB_NO_STDIO` - `math`: Add a class related to math. Conflict with `MRB_NO_FLOAT` - `metaprog`: Adds features related to metaprogramming. Purpose gembox: - `default.gembox`: Import the same gems as before - `default-no-stdio.gembox`: Import the` stdlib` and `math` - `default-no-fpu.gembox`: Import the` stdlib` only
2020-12-21refactor: fix Rake link and fix missing HTTPS on linksJohn Bampton
2020-12-21Merge pull request #5238 from shuujii/fix-typo-in-.github-workflows-build.ymlYukihiro "Matz" Matsumoto
Fix typo in `.github/workflows/build.yml` [skip travis][skip appveyor]
2020-12-21Fix typo in `.github/workflows/build.yml` [skip travis][skip appveyor]KOBAYASHI Shuji
2020-12-21Merge pull request #5237 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-git-ls-files-instead-of-find-to-avoid-including-.git Use `git ls-files` instead of `find` in `spell-checker.yml` [ci skip]
2020-12-20Use `git ls-files` instead of `find` in `spell-checker.yml` [ci skip]KOBAYASHI Shuji
To avoid including `.git` directory.
2020-12-20Merge pull request #5236 from shuujii/reorganize-GitHub-Actions-configurationYukihiro "Matz" Matsumoto
Reorganize GitHub Actions configuration [skip travis][skip appveyor]
2020-12-20Merge pull request #5235 from jbampton/fix-link-and-fix-word-caseYukihiro "Matz" Matsumoto
refactor: fix case of GitHub and fix missing HTTPS on link
2020-12-20Reorganize GitHub Actions configuration [skip travis][skip appveyor]KOBAYASHI Shuji
* Skip if commit message contains `ci skip`, `skip ci`, or `skip gha` ENCLOSED WITH BRACKETS (excluding lint job). * Separate build and test. This is because builds can be run in parallel, but running tests in parallel can cause logs to get mixed up or not finished. * Don't use Chocolatey because it seems to take 1-2 minutes to start up. * Use the cache better. * Use `actions/checkout@v2` instead of `actions/checkout@v1`. * Remove unnecessary package installation. * Remove unnecessary flag settings. * Remove `-j` for rake because it doesn't seem to have any effect. * Rename `main.yml` to `oss-fuzz.yml` to clarify.
2020-12-19refactor: fix case of GitHub and fix missing HTTPS on linkJohn Bampton
- changed `github` to `GitHub`
2020-12-19Merge pull request #5234 from jbampton/remove-whitespaceYukihiro "Matz" Matsumoto
refactor: remove trailing whitespace
2020-12-19Merge pull request #5233 from jbampton/update-authorsYukihiro "Matz" Matsumoto
Add my name to the AUTHORS file
2020-12-19refactor: remove trailing whitespaceJohn Bampton
2020-12-19Add my name to the AUTHORS fileJohn Bampton
2020-12-19Merge pull request #5232 from jbampton/lint-markdownYukihiro "Matz" Matsumoto
feat(CI): add a GitHub Action to lint the Markdown
2020-12-19Merge pull request #5230 from dearblue/mruby-config.2Yukihiro "Matz" Matsumoto
Ignore `mruby-bin-config` in cross-building
2020-12-19feat(CI): add a GitHub Action to lint the MarkdownJohn Bampton
Run on pull request only Using https://www.npmjs.com/package/markdownlint-cli Lint Markdown for rules: - MD009/no-trailing-spaces - MD012/no-multiple-blanks - MD022/blanks-around-headings - MD031/blanks-around-fences - MD032/blanks-around-lists
2020-12-19Merge pull request #5231 from jbampton/fix-linksYukihiro "Matz" Matsumoto
🔒 Fix missing HTTPS on links
2020-12-19🔒 Fix missing HTTPS on linksJohn Bampton
2020-12-19Merge pull request #5229 from jbampton/fix-linksYukihiro "Matz" Matsumoto
🔒 Fix missing HTTPS on links
2020-12-19🔒 Fix missing HTTPS on linksJohn Bampton
2020-12-19Warn that it was ignored in crossbuilddearblue
2020-12-19Avoid using `MRuby::CrossBuild.current`dearblue
This is because `MRuby::Build.currrent` and `MRuby::CrossBuild.current` are assignments to different instance variables.
2020-12-18Merge pull request #5228 from jbampton/spell-checkerYukihiro "Matz" Matsumoto
feat(CI): add a GitHub Action to check spelling
2020-12-17feat(CI): add a GitHub Action to check spellingJohn Bampton
- Fix spelling - Run only on pull request - Using https://github.com/client9/misspell
2020-12-16Merge pull request #5224 from jbampton/lint-yamlYukihiro "Matz" Matsumoto
feat(CI): add a GitHub Action to lint the YAML
2020-12-16Merge pull request #5227 from shuujii/rename-build-configuration-files-for-CIYukihiro "Matz" Matsumoto
Rename build configuration files for CI
2020-12-16Rename build configuration files for CIKOBAYASHI Shuji
Currently, there are build configuration files for CI, `travis.rb` and `appveyor.rb`, but they are used for GCC/Clang and MSVC, not for Travis CI and Appveyor, respectively. Therefore, rename them to `gcc-clang.rb` and `msvc.rb`, respectively, and move them under `build_config/ci/` to clarify that they are for CI.
2020-12-16Merge pull request #5226 from ↵Yukihiro "Matz" Matsumoto
shuujii/guess-toolchain-when-MRubyBuild-toolchain-argument-is-omitted Guess toolchain when `MRuby::Build#toolchain` argument is omitted
2020-12-16Guess toolchain when `MRuby::Build#toolchain` argument is omittedKOBAYASHI Shuji
2020-12-15feat(CI): add a GitHub Action to lint the YAMLJohn Bampton
- Run only on pull request - Add a `.yamllint` config file - Lint YAML
2020-12-15Merge pull request #5223 from ↵Yukihiro "Matz" Matsumoto
shuujii/ensure-initialization-of-RVALUE_zero-in-mrb_obj_alloc Ensure initialization of `RVALUE_zero` in `mrb_obj_alloc`
2020-12-15Merge pull request #5225 from ↵Yukihiro "Matz" Matsumoto
shuujii/output-build-log-at-the-time-of-installation Output build log at the time of installation
2020-12-15Merge pull request #5222 from jbampton/remove-trailing-whitespaceYukihiro "Matz" Matsumoto
refactor: remove trailing whitespace from C, Header, Ruby and YAML files
2020-12-15Output build log at the time of installationKOBAYASHI Shuji
2020-12-15refactor: remove trailing whitespace from C, Header, Ruby and YAML filesJohn Bampton
Lint
2020-12-15Ensure initialization of `RVALUE_zero` in `mrb_obj_alloc`KOBAYASHI Shuji
Union initialization initializes the first member. The first member of `RVALUE` is `struct free_obj`, but because it is only 4-words, it seems that initialization after the 5th word is not ensured. Therefore, I created 6-words `struct RVALUE_initializer` for initialization and made it the first member.
2020-12-13Merge pull request #5221 from jbampton/fix-spellingYukihiro "Matz" Matsumoto
Fix spelling
2020-12-13Fix spellingJohn Bampton
2020-12-13Improve source scanning for presymKOBAYASHI Shuji
The accuracy is greatly improved by using the C preprocessor to scan C sources for presym. C preprocessor can perfectly interpret all comments and preprocessor directives, so it can detect all symbols defined, for example `mrbgems/mruby-socket/src/const.cstub`. Also, as described later, this change will greatly improve the accuracy of presym detection from Ruby sources. ## Result The number of lines in the `presym` file for all gems is as follows: ```console Previous: 999 (false positive = 89, undetected = 297) New: 1207 ``` ## Build process The new build process (with presym) is as follows: 1. Build `mrbc` without presym (more on building without presym later). 2. Compile Ruby sources to C struct format with the `mrbc` created in step 1, and create` mrblib.c` and `gem_init.c`. Note that the symbols in the created files are output as `MRB_SYM` family macros or `mrb_intern_lit` instead of IDs (details will be described later). 3. C preprocessor processes C sources including the created files of step 2 and outputs them as `.i` files. In these files, for example, `MRB_IVSYM(foo)` is converted to `<@! "@" "foo" !@>` and `mrb_define_module(mrb, "Foo")` is converted to `<@! "Foo" !@>`. 4. Scan the files created in step 3 and create `presym` and` presym.inc` files. The files created in step 2 should output all static symbols defined in Ruby sources, including local variables, so we can detect all presyms by just scanning C sources without scanning Ruby sources directly. Further, by this process, the files to be scanned becomes the same as the files to be compiled, so that there is no excess or deficiency. ## Related changes The following changes have been made in relation to realizing this feature. ### Allow build without presym It enables build without presym to achieve the "Build process: 1". This incorporates #5202, see its issue for details. Note that when presym is enabled, even adding a local variable to a Ruby source may change contents of presym and require recompilation of almost all C sources. This is inconvenient, especially during trial and error in development, but this feature is also useful because it does not cause this problem if presym is disabled. ### Automatically create build target for `mrbc` without presym The `mrbc` used in the "Build process: 1" will be built by automatically creating a build target for it. The build name is `SOURCE_BUILD_NAME/mrbc`. ### Constantize output of C struct format by `mrbc` To realizing the "Build process: 2", as mentioned above, symbol IDs are not output directly in C struct format output by `mrbc`. As a result, the output becomes constant regardless of the state of presym at the time of `mrbc` build, and it is possible to detect symbols of Ruby sources in the same way as other C sources. Note that `mrb_intern_lit` is used for symbols that do not become presym, but in this state, the corresponding element in the symbol array cannot be statically initialized, so it is initialized at run time (therefore, in this case, the `const` qualifier is not added to the symbol array). ### Specify arbitrary `mrbc` file To realizing the "Build process: 2", enabled to specify `mrbc` created by another build target or pre-built` mrbc`. Use `MRuby::Build#mrbcfile =` to specify it explicitly. You can omit the "Build process: 1" by specifying pre-built `mrbc`, and you can always use an optimized build to compile Ruby sources faster. I think changes that affect the output of `mrbc` are rare, so in many cases it helps to improve efficiency. With presym, the build will be a little slower due to more build steps, but this feature will improve it a bit. ### Create presym files for each build target This feature was proposed at #5194 and merged once, but was reverted in 5c205e6e due to problems especially with cross-compilation. It has been introduced again because this change solves the problem. The presym files will be created below. * `build/NAME/presym` * `build/NAME/include/mruby/presym.inc` ### Other changes * Because presym detection accuracy is greatly improved as mentioned above, `MRuby::Gem::Specification#cdump?` is set to true by default, and `disable_cdump` is added instead of `enable_cdump`. Also, support for gem specific presym files has been discontinued (https://github.com/mruby/mruby/issues/5151#issuecomment-730967232). * Previously, `mrbc` was automatically created for the `host` build, but it will not be created if the build target for `mrbc` mentioned above is automatically created. At this time, `mrbc` file of the `mrbc` build is copied to` bin/`. * Two types of `.d` files will be created, `.o.d` and `.i.d`. oThis is because if `.i` depends on `presym.inc`, the dependency will circulate, so the `.d` file cannot be shared. * Changed file created with `enable_cxx_exception` to `X-cxx.cxx` from `X.cxx` to use the mruby standard Rake rule. ### Note Almost all C sources will need to be recompiled if there are any changes to `persym.inc` (if not recompiled properly, it will often result in run-time error). If `gcc` toolchain is used, dependencies are resolved by the `.d` file, so it become automatically recompile target, but if not (e.g. MSVC), it is necessary to manually make it recompile target. Also, even if `gcc` toolchain is used, it may not become recompile target if external gems does not use the mruby standard Rake rule. In particular, if the standard rule is overwritten, such as https://github.com/mruby/mruby/pull/5112/files, `.d` file will not be read, so be careful.
2020-12-12Remove positive check for unsigned integer; close #5218Yukihiro "Matz" Matsumoto
2020-12-09Argument forwarding with `...` now supports leading arguments.Yukihiro "Matz" Matsumoto
```ruby def method_missing(meth, ...) send(:"do_#{meth}", ...) end ```
2020-12-08Fix a bug caused by `tBDOT3` (argument forwarding).Yukihiro "Matz" Matsumoto
2020-12-07Make type of `pc` arguments in `debug.c` consistent; close #5218Yukihiro "Matz" Matsumoto
They used to be `size_t`, `uint32_t` and `ptrdiff_t`. Now all of them made to be `uint32_t`.
2020-12-06Merge pull request #5217 from ↵Yukihiro "Matz" Matsumoto
shuujii/call-super-before-creating-host-build-in-MRubyCrossBuild-initialize Call `super` before creating `host` build in `MRuby::CrossBuild#initialize`
2020-12-06Call `super` before creating `host` build in `MRuby::CrossBuild#initialize`KOBAYASHI Shuji
Call `super` (`block`) ahead so that creation of the `host` build can be skipped if pre-built `mrbc` can be specified in the future. close #5213.
2020-12-05Merge pull request #5214 from shuujii/allow-obsoluted-MRB_METHOD_T_STRUCTYukihiro "Matz" Matsumoto
Allow obsoluted `MRB_METHOD_T_STRUCT`
2020-12-05Merge pull request #5216 from ↵Yukihiro "Matz" Matsumoto
shuujii/remove-unused-@endian-in-MRubyCrossBuild-initialize Remove unused `@endian` in `MRuby::CrossBuild#initialize`