datetime error in --tconv option

Open
#677 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, python
Domain
compilers

Research direction

Start with datetime.py at lines 336 and 1776, and compare compilation with and without --tconv while using --kwargs and --keycheck. Trace how offset reaches the bounds check and reproduce the TypeError; done when the combined options compile and datetime no longer raises this error.

Written by the indexing model from the issue text.

Description

IS: could not reproduce NEED: info

The following error is raised in --tconv compiler option

datetime.py:336 Uncaught TypeError: Cannot read property 'name' of null

I traced up in call stack. The problem is that 'offset' is null (in datetime.py:1776)

    # __pragma__('opov')
    if not (self._minoffset <= offset <= self._maxoffset):

It has no problem without --tconv option. Possibly 'opov' option collides with --tconv option?

I am trying to use --kwargs, --keycheck, --tconv options altogether because the compiled javascript is directly readable, and I want to obfuscate my source code. Only --tconv option encounters an error in datetime.

Dominant language
Python
Stars
2.9k
Forks
218
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TranscryptOrg/Transcrypt

All issues in TranscryptOrg/Transcrypt

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.