Skip to content

Commit

Permalink
refac(math): mark classname as a mandatory argument
Browse files Browse the repository at this point in the history
  • Loading branch information
chokobole committed Sep 25, 2023
1 parent f13013e commit 55c80a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions tachyon/math/finite_fields/generator/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ def _generate_prime_field_impl(ctx):
arguments = [
"--out=%s" % (ctx.outputs.out.path),
"--namespace=%s" % (ctx.attr.namespace),
"--class=%s" % (ctx.attr.class_name),
"--modulus=%s" % (ctx.attr.modulus),
]

if len(ctx.attr.class_name) > 0:
arguments.append("--class=%s" % (ctx.attr.class_name))

if len(ctx.attr.subgroup_generator):
arguments.append("--subgroup_generator=%s" % (ctx.attr.subgroup_generator))

Expand Down
4 changes: 3 additions & 1 deletion tachyon/math/finite_fields/generator/generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ int RealMain(int argc, char** argv) {
parser.AddFlag<base::StringFlag>(&config.ns_name)
.set_long_name("--namespace")
.set_required();
parser.AddFlag<base::StringFlag>(&config.class_name).set_long_name("--class");
parser.AddFlag<base::StringFlag>(&config.class_name)
.set_long_name("--class")
.set_required();
parser.AddFlag<base::StringFlag>(&config.modulus)
.set_long_name("--modulus")
.set_required();
Expand Down

0 comments on commit 55c80a6

Please sign in to comment.