Skip to content

ArgumentError: Too deeply nested during rerdoc #230

@joemsak

Description

@joemsak

Happened both with sdoc 2.5.0 and I tried again with 2.6.1, same issue.

Getting this error both locally in my containerized rails app when running rails rerdoc and in our github action which uses rails rdoc:

2023-06-09T22:14:01.7278892Z > bundle exec rails rdoc

2023-06-09T22:14:01.7336910Z shell: /usr/bin/bash -e {0}
2023-06-09T22:14:01.7337340Z env:
2023-06-09T22:14:01.7337637Z   PG_HOST: localhost
2023-06-09T22:14:01.7337990Z   REDIS_URL: redis://localhost:6379/0
2023-06-09T22:14:01.7338385Z   REDIS_SIDEKIQ_URL: redis://localhost:6379/1
2023-06-09T22:14:01.7338879Z   ANALYTICS_MONGO_DB_URL: mongodb://localhost:27017/meberspace-analytics-dev
2023-06-09T22:14:01.7339279Z ##[endgroup]

2023-06-09T22:14:11.1384477Z rails aborted!
2023-06-09T22:14:11.1384777Z ArgumentError: Too deeply nested.

2023-06-09T22:14:11.1385502Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/sdoc-2.5.0/lib/sdoc/generator.rb:91:in `generate'
2023-06-09T22:14:11.1386186Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
2023-06-09T22:14:11.1386884Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
2023-06-09T22:14:11.1387533Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
2023-06-09T22:14:11.1388210Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
2023-06-09T22:14:11.1388881Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
2023-06-09T22:14:11.1389540Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
2023-06-09T22:14:11.1390216Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
2023-06-09T22:14:11.1390856Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
2023-06-09T22:14:11.1391837Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
2023-06-09T22:14:11.1392523Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
2023-06-09T22:14:11.1393182Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
2023-06-09T22:14:11.1393841Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
2023-06-09T22:14:11.1394487Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
2023-06-09T22:14:11.1395118Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
2023-06-09T22:14:11.1395807Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
2023-06-09T22:14:11.1396472Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
2023-06-09T22:14:11.1397127Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
2023-06-09T22:14:11.1397791Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
2023-06-09T22:14:11.1398666Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
2023-06-09T22:14:11.1399405Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
2023-06-09T22:14:11.1400135Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
2023-06-09T22:14:11.1400859Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
2023-06-09T22:14:11.1401539Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
2023-06-09T22:14:11.1402226Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands/rake/rake_command.rb:18:in `perform'
2023-06-09T22:14:11.1402886Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/command.rb:51:in `invoke'
2023-06-09T22:14:11.1403533Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands.rb:18:in `<main>'
2023-06-09T22:14:11.1404235Z /home/runner/work/memberspace_platform/memberspace_platform/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'

Not sure where to start looking because the entire trace is in gems. Here is our gh-actions workflow file, as that may be helpful

name: Build and Deploy Docs to Netlify
on:
  push:
    branches:
      - staging
      - docs/*
jobs:
  build:
    runs-on: ubuntu-22.04
    env:
      PG_HOST: localhost
      REDIS_URL: redis://localhost:6379/0
      REDIS_SIDEKIQ_URL: redis://localhost:6379/1
      ANALYTICS_MONGO_DB_URL: mongodb://localhost:27017/meberspace-analytics-dev
    steps:
      - uses: actions/checkout@v3
      - uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
        env:
          BUNDLE_ENTERPRISE__CONTRIBSYS__COM: ${{ secrets.BUNDLE_ENTERPRISE__CONTRIBSYS__COM }}
      - uses: supercharge/redis-github-action@1.4.0
        with:
          redis-version: 6.2

      - name: Build Docs
        run: bundle exec rails rdoc

      - name: Deploy to Netlify
        uses: nwtgck/actions-netlify@v1.2
        with:
          publish-dir: './doc'
          alias: preview
          production-branch: staging
          github-token: ${{ secrets.GITHUB_TOKEN }}
          deploy-message: 'Deploy from GitHub Actions'
          enable-commit-comment: false
          enable-pull-request-comment: true
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
        timeout-minutes: 5

Same thing happens on our containerized rails app in docker, here is that Dockerfile, in case that helps, too.

FROM ruby:3.2.2

ARG NODE_VERSION=18.15.0
ARG NVM_DIR=/usr/local/nvm
ARG NVM_BIN=$NVM_DIR/versions/node/v$NODE_VERSION/bin

ENV NVM_DIR $NVM_DIR
ENV PATH $NVM_BIN:$PATH

# Ref: https://bundler.io/guides/bundler_docker_guide.html
ENV GEM_HOME="/usr/local/bundle"
ENV PATH $GEM_HOME/bin:$GEM_HOME/gems/bin:$PATH

RUN (apt-get update -y || /bin/true) \
  && apt-get install -y -q --no-install-recommends \
    tmux \
    firefox-esr \
  && curl -L https://github.com/mozilla/geckodriver/releases/download/v0.32.2/geckodriver-v0.32.2-linux64.tar.gz | tar xz -C /usr/local/bin \
  && curl -L https://github.com/DarthSim/overmind/releases/download/v2.4.0/overmind-v2.4.0-linux-amd64.gz | gzip -d > /usr/local/bin/overmind \
  && chmod +x /usr/local/bin/overmind

RUN mkdir $NVM_DIR \
  && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash \
  && . $NVM_DIR/nvm.sh \
  && nvm install $NODE_VERSION \
  && nvm alias default $NODE_VERSION \
  && nvm use default \
  && npm i -g yarn

Any insight or advice? Happy to provide any other context or perform any other tests per suggestion. Thank you for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions