Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build error with new mojo version #18

Merged
merged 1 commit into from
Dec 29, 2023
Merged

Fix build error with new mojo version #18

merged 1 commit into from
Dec 29, 2023

Conversation

kp992
Copy link
Collaborator

@kp992 kp992 commented Dec 27, 2023

Fixes #17

@kp992
Copy link
Collaborator Author

kp992 commented Dec 27, 2023

@mmcky These are the updates that fixes the build error for me locally with the following mojo version.

Logs

% jb build ./      
Running Jupyter-Book v0.15.1
Source Folder: /Users/kpl/repos/project.lecture-mojo
Config Path: /Users/kpl/repos/project.lecture-mojo/_config.yml
Output Path: /Users/kpl/repos/project.lecture-mojo/_build/html
Running Sphinx v5.0.2
making output directory... done
[etoc] Changing master_doc to 'intro'
myst v0.18.1: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=['colon_fence', 'dollarmath', 'linkify', 'substitution', 'tasklist'], disable_syntax=[], all_links_external=False, url_schemes=['mailto', 'http', 'https'], ref_domains=None, highlight_code_blocks=True, number_code_blocks=[], title_to_header=False, heading_anchors=None, heading_slug_func=None, footnote_transition=True, words_per_minute=200, sub_delimiters=('{', '}'), linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area')
myst-nb v0.17.2: NbParserConfig(custom_formats={}, metadata_key='mystnb', cell_metadata_key='mystnb', kernel_rgx_aliases={}, execution_mode='cache', execution_cache_path='', execution_excludepatterns=[], execution_timeout=600, execution_in_temp=False, execution_allow_errors=False, execution_raise_on_error=False, execution_show_tb=False, merge_streams=False, render_plugin='default', remove_code_source=False, remove_code_outputs=False, code_prompt_show='Show code cell {type}', code_prompt_hide='Hide code cell {type}', number_source_lines=False, output_stderr='show', render_text_lexer='myst-ansi', render_error_lexer='ipythontb', render_image_options={}, render_figure_options={}, render_markdown_format='commonmark', output_folder='build', append_css=True, metadata_to_fm=False)
Using jupyter-cache at: /Users/kpl/repos/project.lecture-mojo/_build/.jupyter_cache
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 6 source files that are out of date
updating environment: [new config] 6 added, 0 changed, 0 removed
/Users/kpl/repos/project.lecture-mojo/applications/shortest_paths.md: Executing notebook using local CWD [mystnb]
/Users/kpl/repos/project.lecture-mojo/applications/shortest_paths.md: Executed notebook in 3.10 seconds [mystnb]
/Users/kpl/repos/project.lecture-mojo/applications/shortest_paths.md: Cached executed notebook: ID=1 [mystnb]
/Users/kpl/repos/project.lecture-mojo/applications/wealth_distribution.md: Executing notebook using local CWD [mystnb]
/Users/kpl/repos/project.lecture-mojo/applications/wealth_distribution.md: Executed notebook in 2.74 seconds [mystnb]
/Users/kpl/repos/project.lecture-mojo/applications/wealth_distribution.md: Cached executed notebook: ID=2 [mystnb]
/Users/kpl/repos/project.lecture-mojo/examples/matmul_comparison.ipynb: Executing notebook using local CWD [mystnb]
/Users/kpl/repos/project.lecture-mojo/examples/matmul_comparison.ipynb: Executed notebook in 2.31 seconds [mystnb]
/Users/kpl/repos/project.lecture-mojo/examples/matmul_comparison.ipynb: Cached executed notebook: ID=3 [mystnb]
/Users/kpl/repos/project.lecture-mojo/intro.md: Executing notebook using local CWD [mystnb]
/Users/kpl/repos/project.lecture-mojo/intro.md: Executed notebook in 1.00 seconds [mystnb]
/Users/kpl/repos/project.lecture-mojo/intro.md: Cached executed notebook: ID=4 [mystnb]
/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md: Executing notebook using local CWD [mystnb]
[ErrorLog] Failed to parse the module
[ErrorLog] Expression [3]:3:5: expression must be mutable for in-place operator destination
    x += 1
    ^

/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md: Executed notebook in 2.61 seconds [mystnb]
/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md: Cached executed notebook: ID=5 [mystnb]

looking for now-outdated files... none found
pickling environment... done
checking consistency... /Users/kpl/repos/project.lecture-mojo/README.md: WARNING: document isn't included in any toctree
/Users/kpl/repos/project.lecture-mojo/examples/matmul_comparison.ipynb: WARNING: document isn't included in any toctree
done
preparing documents... WARNING: unsupported theme option 'dark_logo' given
done
writing output... [100%] tutorial/mojo_demo                                     
/Users/kpl/repos/project.lecture-mojo/applications/shortest_paths.md:22: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/shortest_paths.md:32: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/shortest_paths.md:109: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/shortest_paths.md:125: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/shortest_paths.md:140: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/shortest_paths.md:151: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/shortest_paths.md:170: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/wealth_distribution.md:21: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/wealth_distribution.md:33: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/wealth_distribution.md:76: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/wealth_distribution.md:96: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/wealth_distribution.md:141: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/wealth_distribution.md:185: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/applications/wealth_distribution.md:207: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/examples/matmul_comparison.ipynb:10002: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/examples/matmul_comparison.ipynb:20002: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md:29: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md:54: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md:66: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md:89: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md:108: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md:120: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md:150: WARNING: Pygments lexer name 'mojo' is not known
/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md:163: WARNING: Pygments lexer name 'mojo' is not known
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
[etoc] missing index.html written as redirect to 'intro.html'
build succeeded, 27 warnings.

The HTML pages are in _build/html.

===============================================================================

Finished generating HTML for book.
Your book's HTML pages are here:
    _build/html/
You can look at your book by opening this file in a browser:
    _build/html/index.html
Or paste this line directly into your browser bar:
    file:///Users/kpl/repos/project.lecture-mojo/_build/html/index.html            

===============================================================================

% mojo -v
mojo 0.6.1 (876ded2e)

@kp992
Copy link
Collaborator Author

kp992 commented Dec 27, 2023

[ErrorLog] Failed to parse the module
[ErrorLog] Expression [3]:3:5: expression must be mutable for in-place operator destination
    x += 1
    ^

/Users/kpl/repos/project.lecture-mojo/tutorial/mojo_demo.md: Executed

This is one error log which is expected(tagged with raises-exception) and comes from

@kp992
Copy link
Collaborator Author

kp992 commented Dec 27, 2023

Rest all is working fine for me locally. The generated pages locally also have the output.

@mmcky
Copy link
Contributor

mmcky commented Dec 29, 2023

thanks @kp992

@mmcky mmcky merged commit fc3dc55 into main Dec 29, 2023
1 check passed
@mmcky mmcky deleted the issue17 branch December 29, 2023 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Execution Issues in Mojo - Local Builds
2 participants